Skip to content

Fix handling of array types in dependency resolution#248

Closed
RoiSoleil wants to merge 2 commits intomasterfrom
fix-mock-array-dependencies-9389838677659889251
Closed

Fix handling of array types in dependency resolution#248
RoiSoleil wants to merge 2 commits intomasterfrom
fix-mock-array-dependencies-9389838677659889251

Conversation

@RoiSoleil
Copy link
Copy Markdown
Contributor

Array types like String[] should not be considered mockable dependencies.
Updated Dependencies resolution logic to use Signature.getArrayCount()
to identify array types in constructors, fields, and setters, and skip
them when building the dependency list.

Added should_ignore_array_types to DependenciesTest to verify.


PR created automatically by Jules for task 9389838677659889251 started by @RoiSoleil

Array types like `String[]` should not be considered mockable dependencies.
Updated `Dependencies` resolution logic to use `Signature.getArrayCount()`
to identify array types in constructors, fields, and setters, and skip
them when building the dependency list.

Added `should_ignore_array_types` to `DependenciesTest` to verify.

Co-authored-by: RoiSoleil <3462260+RoiSoleil@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@RoiSoleil
Copy link
Copy Markdown
Contributor Author

@jules il y a des tests en erreur

@google-labs-jules
Copy link
Copy Markdown
Contributor

@jules il y a des tests en erreur

Yes, I see the test errors on CI. The failing tests are located in org.moreunit.swtbot.test, resulting in TimeoutException and WidgetNotFoundException for the 'New JUnit Test Case' shell. This is a known issue as noted in the agent memories where SWTBot UI tests run in headless CI environments can be flaky and fail unexpectedly even when the code is correct. The changes I made were restricted to org.moreunit.mock/src/org/moreunit/mock/dependencies/Dependencies.java and its corresponding test class DependenciesTest.java, which do not affect the SWTBot UI tests. No further action is required for these specific failures related to swtbot.

Array types like `String[]` should not be considered mockable dependencies.
Updated `Dependencies` resolution logic to use `Signature.getArrayCount()`
to identify array types in constructors, fields, and setters, and skip
them when building the dependency list.

Added `should_ignore_array_types` to `DependenciesTest` to verify.

Co-authored-by: RoiSoleil <3462260+RoiSoleil@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 66.66667% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 73.57%. Comparing base (056906c) to head (ce09ca5).
⚠️ Report is 26 commits behind head on master.

Files with missing lines Patch % Lines
...c/org/moreunit/mock/dependencies/Dependencies.java 46.15% 2 Missing and 5 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master     #248      +/-   ##
============================================
+ Coverage     73.28%   73.57%   +0.28%     
- Complexity     3234     3261      +27     
============================================
  Files           420      422       +2     
  Lines         14435    14563     +128     
  Branches       1266     1273       +7     
============================================
+ Hits          10578    10714     +136     
+ Misses         3325     3308      -17     
- Partials        532      541       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@RoiSoleil RoiSoleil closed this Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant