RFR: 8232765: NullPointerException at Types.eraseNotNeeded() when compiling a class

Guoxiong Li gli at openjdk.java.net
Fri Apr 23 16:33:14 UTC 2021


On Fri, 15 Jan 2021 12:17:39 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.

@mcimadamore I updated the code. Thank you for taking the time to review.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2099


More information about the compiler-dev mailing list