@CallerSensitive in Java SE 7u25
mandy.chung at oracle.com
Tue Jun 25 18:53:14 UTC 2013
On 6/25/13 3:24 AM, Alan Bateman wrote:
> On 25/06/2013 11:06, Peter Levart wrote:
>> It seems that with 7u25 the result is "shifted" for one calling
>> frame. Is that behavior change intentional to encourage people to
>> "get off that wagon"?
> Right, there is an additional frame that means that getClassClass is
> out by one. This change was unintentional (meaning a bug) and Mandy
> has a fix coming in 7u40 for this, the discussion has been on
> jdk7u-dev rather than here:
The changeset will be pushed to jdk7u40-dev repo as soon as it's open
for business. The regression was unintentional and it was unforunate
that the test didn't catch it as it happened two frames have the same
caller class (my apology).
> As regards getting people off
> sun.reflect.Reflection.getCallerClass(int) then the proposal is
> aggressive, you can read the details but it essentially means it will
> be disabled by default in 7u40.
More information about the core-libs-dev