RFR: [Backport] JDK11-8193367 annotated type variables bounds crash javac

Adam Sotona adam.sotona at oracle.com
Fri Jun 26 06:39:17 UTC 2020


Hi Vicente,
I found the code isIntersectionOrUnionType(Type t) is already there - that is why the patch conflict appears.

Thanks,
Adam

> On 25 Jun 2020, at 21:57, Vicente Romero <vicente.romero at oracle.com> wrote:
> 
> Hi Adam,
> 
> On 6/23/20 6:55 AM, Adam Sotona wrote:
>> Hi,
>> Please review backport of 8193367 into JDK 11.
>> 
>> Original patch at http://hg.openjdk.java.net/jdk/jdk/rev/a772e65727c5 <http://hg.openjdk.java.net/jdk/jdk/rev/a772e65727c5> has just minor conflicts in copyright headers and in one code fragment with JDK 11 repository.
>> 
>> New patch differs in functionality with the original just in one block in src/jdk.compiler/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java:
>> < -                            if (tv.bound.getKind() == TypeKind.INTERSECTION) {
>> < +                            if (tv.getUpperBound().getKind() == TypeKind.INTERSECTION) {
> 
> this difference seems like an important semantic change compared to what the original patch is doing. I guess you will need to port method: `boolean isIntersectionOrUnionType(Type t)` too
>> versus:
>> > -                        return isIntersectionOrUnionType(tv.bound);
>> > +                        return isIntersectionOrUnionType(tv.getUpperBound());
>> 
>> Patched JDK 11 passed all Tier 1, 2 and 3 tests.
>> 
>> Original JBS: https://bugs.openjdk.java.net/browse/JDK-8193367 <https://bugs.openjdk.java.net/browse/JDK-8193367>
>> Webrev: http://cr.openjdk.java.net/~asotona/8193367/webrev.00/ <http://cr.openjdk.java.net/~asotona/8193367/webrev.00/>
>> Backport JBS: https://bugs.openjdk.java.net/browse/JDK-8248014 <https://bugs.openjdk.java.net/browse/JDK-8248014>
>> 
>> Thanks,
>> Adam
> 
> Thanks,
> Vicente

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20200626/6862e644/attachment.htm>


More information about the compiler-dev mailing list