Forbid mocking WeakReference with inline mock maker#3759
Merged
TimvdLippe merged 1 commit intomockito:mainfrom Oct 31, 2025
Merged
Forbid mocking WeakReference with inline mock maker#3759TimvdLippe merged 1 commit intomockito:mainfrom
TimvdLippe merged 1 commit intomockito:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3759 +/- ##
============================================
- Coverage 86.44% 86.41% -0.04%
+ Complexity 2987 2986 -1
============================================
Files 341 341
Lines 9032 9041 +9
Branches 1112 1113 +1
============================================
+ Hits 7808 7813 +5
- Misses 943 944 +1
- Partials 281 284 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
dongjoon-hyun
added a commit
to apache/spark-kubernetes-operator
that referenced
this pull request
Dec 10, 2025
### What changes were proposed in this pull request? This PR aims to upgrade `mockito` to 5.21.0 for Apache Spark K8s Operator `v0.7`. ### Why are the changes needed? To bring the latest features and bug fixes. - https://github.com/mockito/mockito/releases/tag/v5.21.0 - mockito/mockito#3758 - mockito/mockito#3752 - mockito/mockito#3753 - mockito/mockito#3759 - mockito/mockito#3731 ### Does this PR introduce _any_ user-facing change? No behavior change. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #425 from dongjoon-hyun/SPARK-54672. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3758
Possibly we could update the
isMockConstructionpredicate inInlineDelegateByteBuddyMockMakerto avoid this recursive trace. But it also seems to reasonable to do this - not allow mocking WeakReference at all. It's a simple type that shouldn't need to be mocked anyway.Checklist
including project members to get a better picture of the change
commit is meaningful and help the people that will explore a change in 2 years
./gradlew spotlessApplyfor auto-formatting)Fixes #<issue number>in the description if relevantFixes #<issue number>if relevant