Usability issue with changes to bootstrap ClassLoader
Scott Stark
sstark at redhat.com
Wed Apr 12 19:30:57 UTC 2017
The current java.lang.ClassLoader api has changed the effective behavior of passing in a null value as the parent ClassLoader. When this was raised as a regression in bug JDK-8161269(http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8161269), that issue was closed as it had never been specified that all Java SE types be visible via the boot ClassLoader.
We would suggest that a less disruptive change would be to document that a passing in a null value as a parent ClassLoader would instal the new Platform ClassLoader as the parent. This is the effective behavior in all previous releases of Java.
A new static getBootstrapClassLoader() method could be added to allow those who actually want the now very reduced set of types available as the parent ClassLoader set to use that as the parent ClassLoader.
More information about the jpms-spec-comments
mailing list