Classes on the stack trace (was: getElementClass/StackTraceElement, was: @CallerSensitive public API, was: sun.reflect.Reflection.getCallerClass)

Nick Williams nicholas+openjdk at nicholaswilliams.net
Tue Jul 30 04:58:47 UTC 2013


On Jul 29, 2013, at 11:59 PM, Joseph Darcy wrote:

> 
> On 7/29/2013 9:31 PM, Alan Bateman wrote:
>> On 29/07/2013 19:17, David M. Lloyd wrote:
>>> 
>>> Your phrasing makes me think I missed something: is the Reflection.getCallerClass() method being removed due to some technical issue that it can only be somehow emulated as a workaround?  Or is it just a general cleanup effort?
>>> 
>> The sun.reflect.Reflection.getCallerClass(int) method was removed as part of JEP 176 [1].
>> 
>> -Alan.
>> 
>> [1] http://openjdk.java.net/jeps/176
>> 
> 
> And as a sun.* method, this was officially outside of the exported interface of the JDK and not something that should be expected to work if called from outside of the JDK.

As has been said many, many times in the last few days, we are all well aware of this. It doesn't make the problem any less disastrous for the community. This needs to be replaced with a public API.

Nick


More information about the core-libs-dev mailing list