RFR 6642881: Improve performance of Class.getClassLoader() (original) (raw)
Alan Bateman Alan.Bateman at oracle.com
Tue Jun 24 07:13:29 UTC 2014
- Previous message: RFR 6642881: Improve performance of Class.getClassLoader()
- Next message: RFR 6642881: Improve performance of Class.getClassLoader()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 24/06/2014 00:45, Coleen Phillimore wrote:
Please review a change to the JDK code for adding classLoader field to the instances of java/lang/Class. This change restricts reflection from changing access to the classLoader field. In the spec, AccessibleObject.setAccessible() may throw SecurityException if the accessibility of an object may not be changed: http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/AccessibleObject.html#setAccessible(boolean)
Only AccessibleObject.java has changes from the previous version of this change. open webrev at http://cr.openjdk.java.net/~coleenp/6642881jdk4/ bug link https://bugs.openjdk.java.net/browse/JDK-6642881 Having setAccessible throw SecurityException when there isn't a security manager set is a bit odd but as you point out, setAccessible is specified to allow that. The changes looks okay, although I don't think strictly necessary.
-Alan.
- Previous message: RFR 6642881: Improve performance of Class.getClassLoader()
- Next message: RFR 6642881: Improve performance of Class.getClassLoader()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]