RFR (S) JDK-8026394: Eclipse fails with JDK8 build 111
Lois Foltan
lois.foltan at oracle.com
Tue Oct 22 11:57:18 PDT 2013
On 10/22/2013 10:25 AM, Karen Kinnear wrote:
> Lois,
>
> The current code is a bit sloppy in its use of terms. What I think would be clearer if we could consistently use the following terms:
>
> Caller C.foo() // where C is the current class
> invokeX A.m() O // where A is a methodref or interfacemethodref (see constantpool terms)
> // where O is the objectref used for method selection
>
> Step 1: method/interface method resolution
> 1.1 lookup A in the constantpool - return what the code calls calls the resolved_klass, as in constant pool resolution
> - which also does access control checks on A from caller class C
> 1.2 method/interface method resolution
> - which finds the resolved_method (and the resolved_method->method_holder)
> - which is calling this check_method_accessibility
> Step 3: method selection
> 3. method selection is based on the objectref
>
>
> So for this particular code, which today is used at method/interface method resolution time:
> "If the resolved interface does not ..., the method/interface method resolution looks to the interface's super class, java.lang.Object."
Hi Karen,
Thank you for the detailed explanation. I have updated the comment
within the code and as well for the final summary within the commit info.
Lois
>
> thanks,
> Karen
>
> On Oct 21, 2013, at 10:15 PM, Lois Foltan wrote:
>
>> On 10/21/2013 9:43 PM, Karen Kinnear wrote:
>>> Lois,
>>>
>>> Fix looks good.
>> Thanks for the review!
>>> I'm not sure what this sentence is there for -
>>> "If a direct interface of a class does not contain "clone" or "finalize" the methods would be found in the interface's super class, java.lang.Object"
>>> does the "of a class" refer to the objectref for method selection?
>> By "of a class" my intent was referring to the class that implements the interface that is currently being considered for method selection. However, really the "of a class" has no bearing on this situation. So I can understand how this is confusing. I will reword to,
>> "If the selected interface does not itself contain "clone" or "finalize" methods, the selection process looks to the
>> interface's super class, java.lang.Object."
>> Hopefully this is better?
>>
>> Thanks,
>> Lois
>>> Thank you for the test.
>>>
>>> thanks,
>>> Karen
>>>
>>> On Oct 21, 2013, at 7:58 PM, Lois Foltan wrote:
>>>
>>>> Please review the following fix:
>>>>
>>>> Webrev:
>>>> http://cr.openjdk.java.net/~hseigel/bug_jdk8026394/
>>>>
>>>> Bug: Eclipse fails with JDK8 build 111
>>>> https://bugs.openjdk.java.net/browse/JDK-8026394
>>>>
>>>> Summary of fix:
>>>> If a direct interface of a class does not declare "clone" or "finalize" methods, the selection process
>>>> looks to the interface's super class, java.lang.Object. With the JDK 8 interface accessability
>>>> check requirement, since these methods are declared within Object as protected, an IAE would
>>>> result. In order to support pre-existing Java code, LinkResolver::check_method_accessability()
>>>> must check for and special case these two methods.
>>>>
>>>> Tests:
>>>> Completed - jtreg, vm.quick.testlist, jck vm & lang
>>>> In progress - jdk java.lang & java.util
>>>>
>>>> Thank you, Lois
More information about the hotspot-runtime-dev
mailing list