On Fri, 9 Jan 2026 23:35:35 GMT, Vicente Romero <[email protected]> wrote:
> javac should generate a null check for code like:
>
>
> class Test {
> public static void main(String... args) {
> Object s = null;
> Object o = (String & Runnable!) s; // NPE, cast
> }
> }
>
> the idea of the fix is to consider an intersection null restricted if at
> least one of its components is null restricted
Looks good
-------------
Marked as reviewed by mcimadamore (Committer).
PR Review:
https://git.openjdk.org/valhalla/pull/1881#pullrequestreview-3651909016