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

Fixes #1717 : configure the MethodVisitor for Java 11 compatibility #1718

Merged
merged 1 commit into from May 24, 2019

Conversation

fpavageau
Copy link
Contributor

I'm looking into adding a unit test, if I can find how to use Byte Buddy to generate a class with a Conditional Dynamic instruction when running with Java 11.

@fpavageau
Copy link
Contributor Author

This should fix #1717.

@codecov-io
Copy link

codecov-io commented May 24, 2019

Codecov Report

Merging #1718 into release/2.x will decrease coverage by 0.85%.
The diff coverage is 100%.

Impacted file tree graph

@@                Coverage Diff                @@
##             release/2.x    #1718      +/-   ##
=================================================
- Coverage          86.53%   85.67%   -0.86%     
+ Complexity          2481     2477       -4     
=================================================
  Files                309      309              
  Lines               6528     6528              
  Branches             818      818              
=================================================
- Hits                5649     5593      -56     
- Misses               681      747      +66     
+ Partials             198      188      -10
Impacted Files Coverage Δ Complexity Δ
...al/creation/bytebuddy/InlineBytecodeGenerator.java 78.16% <100%> (-9.86%) 26 <0> (-1)
...al/creation/bytebuddy/SubclassInjectionLoader.java 21.05% <0%> (-50%) 4% <0%> (-2%)
...ito/internal/creation/bytebuddy/ModuleHandler.java 9.61% <0%> (-17.31%) 2% <0%> (ø)
...ternal/exceptions/stacktrace/StackTraceFilter.java 65.85% <0%> (-12.2%) 8% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 71603d4...a626b1c. Read the comment docs.

@fpavageau
Copy link
Contributor Author

I've added a unit test, thanks to an article written by @raphw, of course.

@raphw
Copy link
Member

raphw commented May 24, 2019

Could you update the PR to use OpenedClassReader.ASM_API. This way, if Byte Buddy's experimental feature is used, Mockito is capable of processing class files.

…ility

By using Byte Buddy's supported ASM API version, the visitor will always be
compatible with the currently supported bytecode, including when using the
experimental feature.
@fpavageau
Copy link
Contributor Author

@raphw done. I've also rebased on release/2.x.

@raphw
Copy link
Member

raphw commented May 24, 2019

LGTM

@TimvdLippe
Copy link
Contributor

I will merge this and publish a new version

@TimvdLippe TimvdLippe merged commit d86b9a3 into mockito:release/2.x May 24, 2019
@fpavageau fpavageau deleted the fix-asm-visitor branch May 24, 2019 20:26
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.

None yet

4 participants