RFR: fixing bug in null checks generation [v5]
Jan Lahoda
jlahoda at openjdk.org
Thu Jan 29 13:24:35 UTC 2026
On Wed, 28 Jan 2026 16:09:19 GMT, Vicente Romero <vromero at openjdk.org> wrote:
>> Javac is generating erroneous null checks for code like, test case provided by Jan:
>>
>>
>> public class Main {
>> public String g() {
>> return Other.str = "";
>> }
>> }
>> class Other {
>> public static String! str = "";
>> }
>>
>> so there is no point in generating null checks on the left side of an assignment statement. So the proposal is to use a switch to indicate when null checks shouldn't be generated.
>>
>> TIA
>
> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:
>
> unrolling assignop in Lower
Looks good to me, thanks!
-------------
Marked as reviewed by jlahoda (no project role).
PR Review: https://git.openjdk.org/valhalla/pull/1972#pullrequestreview-3722686500
More information about the valhalla-dev
mailing list