Review request for 6516909: (cl spec) ClassLoader.loadClass() clarification to indicate it shouldn't be used for array classes
mandy.chung at oracle.com
Mon Jan 13 23:02:39 UTC 2014
This patch is to fix:
6516909: (cl spec) ClassLoader.loadClass() clarification to indicate it
shouldn't be used for array classes
4932272: (cl) Remove declaration of the unused private method
In JDK 5, parameter checking of ClassLoader.loadClass and other methods
was modified to validate if the given class name is a binary name.
ClassLoader.loadClass cannot be used to load an array class; instead it
should use Class.forName. This patch adds a sentence in the "Binary
Name" section in the ClassLoader class description to clarify that.
This patch also removes the "sun.lang.ClassLoader.allowArraySyntax"
system property that was added in JDK 5 to allow existing code to
workaround the incompatibility issue. It was disabled by default in JDK
6. It's over 7 years and it's time to remove it. Also remove the
unused private ClassLoader.defineClass0.
More information about the core-libs-dev