--- old/src/share/classes/sun/reflect/Reflection.java Tue Jun 18 22:25:51 2013 +++ new/src/share/classes/sun/reflect/Reflection.java Tue Jun 18 22:25:51 2013 @@ -65,7 +65,17 @@ @Deprecated @CallerSensitive public static Class getCallerClass(int depth) { - return getCallerClass0(depth); + if (sun.misc.VM.allowGetCallerClass()) { + return getCallerClass0(depth+1); + } + throw new UnsupportedOperationException("This method is in the sun.* namespace. " + + "Such methods are not a supported, public interface. " + + "As a temporary measure, the 7u40 release notes describe " + + "a mechanism to reenable the historical functionality of " + + "this method. However, this method will be removed without " + + "further warning in a subsequent 7 update release. " + + "Update code properly using this method to allow the code " + + "to work on future 7 update releases."); } // If the VM enforces getting caller class with @CallerSensitive,