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

Vicente Romero vromero at openjdk.org
Tue Feb 10 00:59:57 UTC 2026


> 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:

  adding support for records

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

Changes:
  - all: https://git.openjdk.org/valhalla/pull/2058/files
  - new: https://git.openjdk.org/valhalla/pull/2058/files/693bdc29..6e8e3ae7

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=valhalla&pr=2058&range=03
 - incr: https://webrevs.openjdk.org/?repo=valhalla&pr=2058&range=02-03

  Stats: 57 lines in 3 files changed: 37 ins; 0 del; 20 mod
  Patch: https://git.openjdk.org/valhalla/pull/2058.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2058/head:pull/2058

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


More information about the valhalla-dev mailing list