# HG changeset patch # User Jaroslav Tulach # Date 1389012357 -3600 # Node ID 876ad06147f3285f934acc78d40dc410526cb81c # Parent b8ff900a542d3e08122c294db6c45e6a2a009182 Re-adding getDeclaringClass method, but throwing a security exception when it is called diff -r b8ff900a542d -r 876ad06147f3 rt/emul/mini/src/main/java/java/lang/Class.java --- a/rt/emul/mini/src/main/java/java/lang/Class.java Mon Jan 06 13:31:04 2014 +0100 +++ b/rt/emul/mini/src/main/java/java/lang/Class.java Mon Jan 06 13:45:57 2014 +0100 @@ -632,6 +632,20 @@ return getAccess(); } + /** + * If the class or interface represented by this {@code Class} object + * is a member of another class, returns the {@code Class} object + * representing the class in which it was declared. This method returns + * null if this class or interface is not a member of any other class. If + * this {@code Class} object represents an array class, a primitive + * type, or void,then this method returns null. + * + * @return the declaring class for this class + * @since JDK1.1 + */ + public Class getDeclaringClass() { + throw new SecurityException(); + } /** * Returns the simple name of the underlying class as given in the