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

Vicente Romero vromero at openjdk.org
Thu Feb 12 14:14:50 UTC 2026


On Fri, 6 Feb 2026 00:23:01 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; }
> }

This pull request has now been integrated.

Changeset: 43b4d35a
Author:    Vicente Romero <vromero at openjdk.org>
URL:       https://git.openjdk.org/valhalla/commit/43b4d35afa7b33b4172324e7cf7c65db4a23bb40
Stats:     382 lines in 7 files changed: 377 ins; 0 del; 5 mod

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

Reviewed-by: mcimadamore

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

PR: https://git.openjdk.org/valhalla/pull/2058


More information about the valhalla-dev mailing list