RFR: 8232613: Move Object.registerNatives into HotSpot

Lois Foltan lois.foltan at oracle.com
Tue Oct 22 17:09:31 UTC 2019

On 10/22/2019 11:03 AM, Claes Redestad wrote:
> On 2019-10-22 15:55, David Holmes wrote:
>>>> With your change interface I's registerNatives default method is 
>>>> invoked successfully.  I don't think this is a major backward 
>>>> compatibilty issue but we should have someone from core-libs okay 
>>>> the removal of the method from Object before committing.  In 
>>>> addition, can you add this test as part of your change?  I think it 
>>>> would be okay to put it in open/test/hotspot/jtreg/runtime/8024804 
>>>> which contains an existing registerNatives test.
>>> Yeah, *not* throwing an IAE on this feels like an unintentional bug 
>>> fix.
>>> :-)
>> Yes it is a somewhat surprising aspect of default method resolution, 
>> but methods in the class hierarchy must be considered ahead of any 
>> default method - even inaccessible ones.
>>> We're relaxing a very subtle interaction, so I think compatibility
>>> issues with existing code is non-existing. 
>> I don't think there is a compatibility issue here because we don't in 
>> general have to maintain error compatibility. However as it is a 
>> change in behaviour it does warrant a CSR request just so the 
>> compatibility argument is captured/recorded.
> Filed and drafted a CSR: https://bugs.openjdk.java.net/browse/JDK-8232801

Hi Claes,

You have my review for webrev .03.  Thanks for adding the test case.  I 
agree with David that a CSR is warranted.  Only minor comment I have on 
it is that in a couple of places you use "IllegalArgumentError" instead 
of "IllegalAccessError".


> Thanks!
> /Claes

More information about the hotspot-runtime-dev mailing list