RFR: 8143317: jdk/lambda/vm/InterfaceAccessFlagsTest.java fails with IncompatibleClassChangeError
Yumin Qi
yumin.qi at oracle.com
Fri Jan 15 16:23:30 UTC 2016
Harold,
Thanks for the review!
There is second version changed according to suggested by Paul:
Weberv: http://cr.openjdk.java.net/~minqi/8143317/webrev-02
Yumin
On 1/15/2016 6:02 AM, harold seigel wrote:
> Hi Yumin,
>
> Your change looks good.
>
> Thanks, Harold
>
> On 1/8/2016 1:13 PM, Yumin Qi wrote:
>> Please review
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8143317
>> Weberv: http://cr.openjdk.java.net/~minqi/8143317/webrev-01/
>>
>> Description: When bug
>> 8145148(https://bugs.openjdk.java.net/browse/JDK-8145148) pushed (it
>> replaced 8087223, will be integrated), the test case
>> InterfaceAccessFlagsTest.java will fail on inconsistent method tag.
>> The fix of 8145148 requires that generated bytecodes follows
>>
>> JVMS-5.4.3.3 Method Resolution:
>> " If C is an interface, method resolution throws an
>> IncompatibleClassChangeError."
>> JVMS-5.4.3.4 Interface Method Resolution:
>> "If C is not an interface, interface method resolution throws an
>> IncompatibleClassChangeError"
>>
>> When converting a class to interface in
>> *ClassToInterfaceConverter.java*, it only deletes "<init>" function
>> from the class, and modifies the class flag to be interface flag. In
>> this case, we have function "m" to call "priv" in the same class
>> "I", after conversion to interface "I", "m" invokes "priv" in the
>> same interface (they are default methods). This requires "priv" in
>> constant pool with tag of InterfaceMethodref, but the conversion does
>> not change the tag to InterfaceMethodref (it keeps tag as Methodref).
>>
>> Added code to convert the invoked Methodref to InterfaceMethodref.
>>
>> Tests: JPRT, jtreg on InterfaceAccessFlags.java, passed for binaries
>> for pre-8145148 and 8145148.
>>
>> Thanks
>> Yumin
>>
>>
>>
>>
>>
>>
>>
>
More information about the jdk9-dev
mailing list