RFR: add use site null checks for fields [v5]
Vicente Romero
vromero at openjdk.org
Mon Jan 19 12:45:13 UTC 2026
On Mon, 19 Jan 2026 10:21:07 GMT, Maurizio Cimadamore <mcimadamore 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/comp/NullChecksWriter.java line 179:
>
>> 177:
>> 178: private Symbol outermostType(Symbol sym) {
>> 179: Symbol prev = null;
>
> Doesn't `sym.outermostClass()` work?
it work but at the end it does a cast to ClassSymbol, unfortunately some fields can have TypeSymbol as its outermost class. This is use in Symtab, an anonymous class of TypeSymbol and the build was failing
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1926#discussion_r2704628434
More information about the valhalla-dev
mailing list