[7u40] Review request for CR 8014925: Disable sun.reflect.Reflection.getCallerClass(int) with a temporary switch to re-enable it
jeroen at sumatra.nl
Tue Jun 18 23:12:28 PDT 2013
Part of the exception message is a bit confusing:
"Update code properly using this method to allow the code "
Otherwise the change looks good (I'm not an official reviewer).
> -----Original Message-----
> From: jdk7u-dev-bounces at openjdk.java.net [mailto:jdk7u-dev-
> bounces at openjdk.java.net] On Behalf Of Mandy Chung
> Sent: Wednesday, June 19, 2013 7:58
> To: jdk7u-dev at openjdk.java.net; Alan Bateman; Christian Thalinger
> Subject: [7u40] Review request for CR 8014925: Disable
> sun.reflect.Reflection.getCallerClass(int) with a temporary switch to
> re-enable it
> Alan, Chris,
> Can you review the fix for
>  8014925: Disable sun.reflect.Reflection.getCallerClass(int) with a
> temporary switch to re-enable it  8016814:
> sun.reflect.Reflection.getCallerClass returns the wrong stack frame
> Webrev at:
> This will disable sun.reflect.Reflection.getCallerClass(int) by default
> and throw an UnsupportedOperationException. This method is in the
> sun.* namespace. Such methods are not a supported, public interface
> . This method has been removed in JDK8 and will be removed in a
> future 7 update release. Existing code depending on this private API
> will need to updated properly to work on future 7 update releases. As a
> temporary measure, a system property "jdk.reflect.allowGetCallerClass"
> is provided to reenable the previous behavior.
> This also fixes a regression introduced in 7u25 in which
> getCallerClass(int) is now a Java method that adds an additional frame
> that wasn't taken into account.
> Once the code review is approved, I'll proceed with the Phase2 Push
> Approval Request.
>  http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8014925
>  http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8016814
>  http://www.oracle.com/technetwork/java/faq-sun-packages-142232.html
More information about the jdk7u-dev