RFR: JDK-8182107: javax.tools.ToolProvider should detect if jdk.compiler matches the version of java.compiler

Jonathan Gibbons jonathan.gibbons at oracle.com
Tue Jan 9 21:39:35 UTC 2018


Please review this simple fix for javax.tools.ToolProvider, to verify 
that if a candidate impl of
JavaCompiler is found, it is in a module with the sane version as that 
of the java.compiler module.

The fix also changes the code to use direct API to access module 
details, instead of reflection,
which is no longer necessary.

The new test performs a "control" experiment to verify that ToolProvider 
continues to work as
expected in a normal system image. It then creates an updated modular 
jar containing the
classes for java.compiler, but with an updated module version, and 
verifies that when using this
module on the upgrade module path, the jdk.compiler in the system image 
is ignored.

JBS: https://bugs.openjdk.java.net/browse/JDK-8182107
Webrev: http://cr.openjdk.java.net/~jjg/8182107/webrev.00/

-- Jon


More information about the compiler-dev mailing list