RFR: 8354556: Expand value-based class warnings to java.lang.ref API [v4]
Vicente Romero
vromero at openjdk.org
Mon May 5 14:46:48 UTC 2025
On Mon, 5 May 2025 09:40:16 GMT, Yudi Zheng <yzheng at openjdk.org> wrote:
>> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:
>>
>> changes to test
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java line 669:
>
>> 667:
>> 668: public boolean isValueBased() {
>> 669: return (tsym.flags_field & VALUE_BASED) != 0;
>
> We have encountered a NPE in javac:
>
> java.lang.NullPointerException: Cannot read field "flags_field" because "this.tsym" is null
> at jdk.compiler/com.sun.tools.javac.code.Type.isValueBased(Type.java:669)
> at jdk.compiler/com.sun.tools.javac.comp.Check.checkRequiresIdentity(Check.java:5739)
> at jdk.compiler/com.sun.tools.javac.comp.Attr.visitNewClass(Attr.java:2918)
> at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCNewClass.accept(JCTree.java:1915)
> ...
>
> It looks like `tsym` can be null https://github.com/openjdk/jdk/blob/60f1f53b18d065f110936e71b7430d7e365881d4/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java#L517-L519
thanks for the report I will update the PR
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24746#discussion_r2073595845
More information about the core-libs-dev
mailing list