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

Guoxiong Li gli at openjdk.java.net
Mon Apr 26 14:16:32 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.

This pull request has now been integrated.

Changeset: 2b09ff21
Author:    Guoxiong Li <gli at openjdk.org>
Committer: Maurizio Cimadamore <mcimadamore at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/2b09ff21
Stats:     312 lines in 2 files changed: 312 ins; 0 del; 0 mod

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

Reviewed-by: mcimadamore

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

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


More information about the compiler-dev mailing list