RFR: Remove redundant null checks [v8]

Vicente Romero vromero at openjdk.org
Tue Feb 3 13:38:25 UTC 2026


On Mon, 26 Jan 2026 11:27:01 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Vicente Romero has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 12 additional commits since the last revision:
>> 
>>  - Merge branch 'bworld' into remove.redundant.null.checks
>>  - minor change
>>  - addressing review comments
>>  - adding test cases
>>  - adding more tests
>>  - adding more tests
>>  - minor change
>>  - another change
>>  - regression tests
>>  - remove redundant null checks
>>  - ... and 2 more: https://git.openjdk.org/valhalla/compare/f3c0d0a9...37939f06
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/NullChecksWriter.java line 218:
> 
>> 216: 
>> 217:     public void visitTypeCast(JCTypeCast tree) {
>> 218:         boolean generateNullCheck = tree.strict;
> 
> Not sure this is still required -- `Attr` will filter this out anyway?

yep I removed this code and modified the one in Attr a bit

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1947#discussion_r2759125516


More information about the valhalla-dev mailing list