RFR  JDK-8179424: Remove terminally deprecated sun.reflect.Reflection.getCallerClass
mandy.chung at oracle.com
Thu Dec 21 16:09:52 UTC 2017
On 12/21/17 2:20 AM, Chris Hegarty wrote:
> David, Alan,
>> On 21 Dec 2017, at 09:54, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>> On 21/12/2017 09:29, David Holmes wrote:
>>>> Updated webrev:
>>> I don't quite follow the change to the langtools test. Is it just trying to reference something in jdk.unsupported? I don't know what the "patch" does.
>> I looked through webrev.02 and it looks okay. I assume there will be a follow-up bug created to re-examine JVM_GetCallerClass.
>> The update to the jdeps test does look a bit odd, wouldn't it be better to change it to another internal API?
> The test is about identifying StackWalker as the replacement
> supported API for getCallerClass, which is continues to do.
> I could add yet another scenario to test for a different internal
> API that also has a replacement, and add the appropriate
> @modules to the test to expose its package.
The test shows sun.reflect.Reflection as a removed API seems odd since
the class is present but not getCallerClass(int).
p.Main is used to check that reference to sun.reflect.Reflection is
flagged as JDK internal use and not a removed class. I suggest to
change it to use another sun.reflect.Reflection API and create an issue
to follow up sun.reflect.Reflection as flagged as a removed API.
More information about the hotspot-runtime-dev