Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StackWalker.Option not found on Mockito 5.1.0 #2891

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

reta
Copy link
Contributor

@reta reta commented Jan 30, 2023

Fixes #2890

Checklist

  • Read the contributing guide
  • PR should be motivated, i.e. what does it fix, why, and if relevant how
  • If possible / relevant include an example in the description, that could help all readers
    including project members to get a better picture of the change
  • Avoid other runtime dependencies
  • Meaningful commit history ; intention is important please rebase your commit history so that each
    commit is meaningful and help the people that will explore a change in 2 years
  • The pull request follows coding style
  • Mention Fixes #<issue number> in the description if relevant
  • At least one commit should mention Fixes #<issue number> if relevant

Signed-off-by: Andriy Redko <drreta@gmail.com>
@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2023

Codecov Report

Base: 85.81% // Head: 85.65% // Decreases project coverage by -0.17% ⚠️

Coverage data is based on head (3f7ea58) compared to base (19ab3ea).
Patch coverage: 26.08% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2891      +/-   ##
============================================
- Coverage     85.81%   85.65%   -0.17%     
- Complexity     2844     2847       +3     
============================================
  Files           324      325       +1     
  Lines          8601     8623      +22     
  Branches       1059     1060       +1     
============================================
+ Hits           7381     7386       +5     
- Misses          947      964      +17     
  Partials        273      273              
Impacted Files Coverage Δ
.../mockito/internal/debugging/Java8LocationImpl.java 6.66% <6.66%> (ø)
...rg/mockito/internal/debugging/LocationFactory.java 66.66% <62.50%> (-33.34%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@TimvdLippe
Copy link
Contributor

Just for my understanding, this still is compatible with the SecurityManager issues you initially did the work for @reta ? It would be a shame to lose these, but not sure if that's still the case.

@reta
Copy link
Contributor Author

reta commented Jan 30, 2023

Just for my understanding, this still is compatible with the SecurityManager issues you initially did the work for @reta ? It would be a shame to lose these, but not sure if that's still the case.

@TimvdLippe yes, the change should be compatible (but I will double check). The reason is that the LocationImpl does not use reflection anymore but imports from JDK. If StackWalker isn't available, LocationImpl won't be loaded, falling back to JDK-8 implementation.

Update: just checked local snapshots, no issues.

@TimvdLippe TimvdLippe merged commit 50b21cf into mockito:main Jan 30, 2023
@TWiStErRob TWiStErRob mentioned this pull request Feb 5, 2023
8 tasks
@TWiStErRob
Copy link
Contributor

Note: this partially reverts #2883 to supply Android compatibility.

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.

StackWalker.Option not found on Mockito 5.1.0
4 participants