These lines in ComboInstance are triggering messages about illegal access violations.
try {
Class<?> fmClass = env.fileManager().getClass();
Method clear = fmClass.getMethod("clear");
clear.setAccessible(true);
clear.invoke(env.fileManager());
} catch (Exception ex) {
throw new IllegalStateException(ex);
}
Passed: tools/javac/processing/T6920317.java
[2019-11-12 14:14:15,180] Agent[6]: stderr: WARNING: An illegal reflective access operation has occurred
[2019-11-12 14:14:15,180] Agent[6]: stderr: WARNING: Illegal reflective access by combo.ComboInstance (file:/w/jjg/work/jdk.dev/build/jtreg/work/classes/0/tools/javac/lib/) to method com.sun.tools.javac.file.BaseFileManager.clear()
[2019-11-12 14:14:15,180] Agent[6]: stderr: WARNING: Please consider reporting this to the maintainers of combo.ComboInstance
[2019-11-12 14:14:15,180] Agent[6]: stderr: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[2019-11-12 14:14:15,180] Agent[6]: stderr: WARNING: All illegal access operations will be denied in a future release
This needs to be fixed before the warnings are promoted to errors.
try {
Class<?> fmClass = env.fileManager().getClass();
Method clear = fmClass.getMethod("clear");
clear.setAccessible(true);
clear.invoke(env.fileManager());
} catch (Exception ex) {
throw new IllegalStateException(ex);
}
Passed: tools/javac/processing/T6920317.java
[2019-11-12 14:14:15,180] Agent[6]: stderr: WARNING: An illegal reflective access operation has occurred
[2019-11-12 14:14:15,180] Agent[6]: stderr: WARNING: Illegal reflective access by combo.ComboInstance (file:/w/jjg/work/jdk.dev/build/jtreg/work/classes/0/tools/javac/lib/) to method com.sun.tools.javac.file.BaseFileManager.clear()
[2019-11-12 14:14:15,180] Agent[6]: stderr: WARNING: Please consider reporting this to the maintainers of combo.ComboInstance
[2019-11-12 14:14:15,180] Agent[6]: stderr: WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
[2019-11-12 14:14:15,180] Agent[6]: stderr: WARNING: All illegal access operations will be denied in a future release
This needs to be fixed before the warnings are promoted to errors.
- duplicates
-
JDK-8236997 tools/javac tests fail with --illegal-access=deny
- Resolved
- relates to
-
JDK-8226585 Improve javac messages for using a preview API
- Resolved