NOTE: The work on this PR and a few others is mirrored on https://github.com/hazendaz/jmockit1/ since it seems like the maintainers of this project are MIA
Encountered some compatibility issues with a project due to outdated bytecode handling. This PR addresses the cases I've encountered personally but should also address the following issues:
https://github.com/jacoco/jacoco/issues/896(Some of the changes are based on the artifact com.github.hazendaz.jmockit:jmockit:1.49.2 which is mentioned in the thread though I could not find @hazendaz hosting the source currently)
729
Other changes under the hood:
Change bytecode handling to explicitly fail rather than assume a type in switch cases (Assisted in debugging, and failing makes the cause more clear than undefined behavior caused by ignoring the issue with fallback behavior)
Use full names instead of shorthand for constants (minor legibility improvement)
Use objenesis instead of direct sun reflection-factory for instance creation
Remove junit platform exclusion in pom.xml, resolving some failures with IntelliJ integration
Testing
You can test the validity of the changes within this project by forcing maven to execute the project in a Java 11+ context. I suggest the maven toolchain plugin for this:
NOTE: The work on this PR and a few others is mirrored on https://github.com/hazendaz/jmockit1/ since it seems like the maintainers of this project are MIA
Encountered some compatibility issues with a project due to outdated bytecode handling. This PR addresses the cases I've encountered personally but should also address the following issues:
com.github.hazendaz.jmockit:jmockit:1.49.2
which is mentioned in the thread though I could not find @hazendaz hosting the source currently)729
Other changes under the hood:
pom.xml
, resolving some failures with IntelliJ integrationTesting
You can test the validity of the changes within this project by forcing maven to execute the project in a Java 11+ context. I suggest the maven toolchain plugin for this:
I tested up to Java 17 with all tests passing.