RFR: JDK-8235597: Extend support for -XDaccessInternalAPI to plugin modules

Jonathan Gibbons jonathan.gibbons at oracle.com
Mon Dec 9 22:07:06 UTC 2019


Please review a small localized change to javac, to extend the support 
for the existing hidden -XDaccessInternalAPI option to plugins provided 
as modules.

The change utilizes the existing ModuleHelper.addExports method.

The test is derived from the recent new test AutostartPlugins.java.  It 
creates a plugin in a jar file, in a module on the module path, and in a 
module that is linked in to the image.  The test case for the classpath 
is not new and is just provided for completeness. A negative test case 
for plugin-as-module is provided, to demonstrate that access fails 
without the option, and there are test cases for modules on the module 
path and jlinked into an image.

The positive test cases just verify that non-null elements in task 
events can be downcast to ClassSymbol, and an internal field (the kind) 
accessed.

No CSR, since the option is undocumented, unsupported and subject to 
change at any time.

-- Jon

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




More information about the compiler-dev mailing list