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

Migrate from Java 1.6 to 1.8 #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

paulschwarz
Copy link

The original intention was to implement a platform-independent way to build up the classpath for the compiler that is invoked during test. However, I encountered a few hairy issues and decided to approach them one by one. Therefore, this pull request can be summarised as:

  • Adjust pom.xml and the annotation processor to use Java 1.8
  • Add a few gitignore entries
  • Add a JUnit After hook to clean up the temporary compiler output files

At this point, surprisingly all tests passed despite the issue I observed running on Windows yesterday. Specifically, on Windows clazz.getProtectionDomain().getCodeSource().getLocation().getFile() returns paths in the form "/C:/Foo/Bar/" (notice the "/" at the start of the line). My original goal was to implement a platform-independent way get this path. However, as-is, tests passed when running against a 8 JDK. So I decided not to commit my changes.

However, when I switched out my JDK to run against an 11 JDK, I had another issue and wasn't able to figure it out in a reasonable amount of time:

Caused by: java.lang.IllegalAccessError: superinterface check failed: class com.sun.tools.javac.processing.JavacProcessingEnvironment$$EnhancerByMockitoWithCGLIB$$2c456aaa_6 (in module jdk.compiler) cannot access class org.mockito.cglib.proxy.Factory (in unnamed module @0x1c72da34) because module jdk.compiler does not read unnamed module @0x1c72da34

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