RFR: fixing bugs in NullChecksWriter [v4]

Vicente Romero vromero at openjdk.org
Mon Jan 12 16:03:44 UTC 2026


On Mon, 12 Jan 2026 15:54:50 GMT, Vicente Romero <vromero at openjdk.org> wrote:

>> fixing some bugs in NullChecksWriter, reported by John Rose. In particular there was no null check being generated by javac for code like:
>> 
>> 
>> class Test {
>>     void m(String someObject) {
>>         String! x = "foo";
>>         x = (String)someObject;  // no null check generated here
>>     }
>> 
>>     public static void main(String... args) {
>>         new Test().m(null);
>>     }
>> }
>
> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:
> 
>   adding tests for return type

thanks for the review

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

PR Comment: https://git.openjdk.org/valhalla/pull/1883#issuecomment-3739292894


More information about the valhalla-dev mailing list