RFR: 8232765: NullPointerException at Types.eraseNotNeeded() when compiling a class [v3]
Guoxiong Li
gli at openjdk.java.net
Sat Apr 24 08:57:26 UTC 2021
On Sat, 24 Apr 2021 08:51:52 GMT, Guoxiong Li <gli at openjdk.org> wrote:
>> Hi all,
>>
>> The method `types::asSuper` may return `null` so that `types.erasure(types.asSuper(iterator.type.getReturnType(), syms.iteratorType.tsym))` throws `NPE`.
>>
>> This patch sets the return type and outputs the corresponding error message if `types::asSuper` returns `null`.
>>
>> Thank you for taking the time to review.
>>
>> Best Regards.
>
> Guoxiong Li has updated the pull request incrementally with one additional commit since the last revision:
>
> Revise error message. Add test cases. Add comment.
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java line 2:
> 1: /*
> 2: * Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
I remained this line, because `Lower` was modified at 2021 but the copyright was not updated.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2099
More information about the compiler-dev
mailing list