logo       

RFC: Class/VMClass patch: msg#00156

java.classpath.patches

Subject: RFC: Class/VMClass patch

Hi,

I'd like to change the Class/VMClass interface for
VMClass.getModifiers() to differentiate between getting the modifiers as
reported by Class.getModifiers() and the modifiers as used by
Class.newInstance() to implement the access check.

Testing shows that the JDK always uses the actual class modifiers to do
the access check (i.e. it ignores the modifiers in the InnerClasses
attribute), but Class.getModifiers() returns the modifiers from the
InnerClasses attribute (obviously only if the class is an inner class).

Regards,
Jeroen

2005-03-21 Jeroen Frijters <jeroen@xxxxxxxxxxxx>

* java/lang/Class.java (getModifiers, newInstance): Changed call
to VMClass.getModifiers().
* vm/reference/java/lang/VMClass.java (getModifiers(Class,
boolean)): New method.

Attachment: Class.patch.txt
Description: Class.patch.txt

_______________________________________________
Classpath-patches mailing list
Classpath-patches@xxxxxxx
http://lists.gnu.org/mailman/listinfo/classpath-patches
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise