RFR: [bworld] Emit lint warnings if overriding method does not have same nullability [v10]

Maurizio Cimadamore mcimadamore at openjdk.org
Thu Feb 12 14:14:47 UTC 2026


On Wed, 11 Feb 2026 18:23:57 GMT, Vicente Romero <vromero at openjdk.org> wrote:

>> emit a lint warning for cases like:
>> 
>> class Test {
>>     String! m(String s) { return ""; }
>> }
>> class Sub extends Test {
>>     @Override
>>     String m(String s) { return null; }
>> }
>> 
>> or:
>> 
>> class Test {
>>     String m(String! s) { return ""; }
>> }
>> class Sub extends Test {
>>     @Override
>>     String m(String s) { return null; }
>> }
>
> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:
> 
>   restoring code

Looks good!

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

Marked as reviewed by mcimadamore (Committer).

PR Review: https://git.openjdk.org/valhalla/pull/2058#pullrequestreview-3791236117


More information about the valhalla-dev mailing list