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.
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:
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