RFR: 8232765: NullPointerException at Types.eraseNotNeeded() when compiling a class [v3]
Guoxiong Li
gli at openjdk.java.net
Sat Apr 24 08:51:52 UTC 2021
> 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.
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/2099/files
- new: https://git.openjdk.java.net/jdk/pull/2099/files/cbbaeddc..415e0efa
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2099&range=02
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2099&range=01-02
Stats: 245 lines in 4 files changed: 191 ins; 46 del; 8 mod
Patch: https://git.openjdk.java.net/jdk/pull/2099.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/2099/head:pull/2099
PR: https://git.openjdk.java.net/jdk/pull/2099
More information about the compiler-dev
mailing list