You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()" because the return value of "Test.m(java.util.List)" is null
at Test.main(Test.java:12)
Expected behavior
The code should have been rejected with
Test.java:12: error: [unboxing.of.nullable] unboxing a possibly-null reference Test.<@Nullable Integer>m(lst)
int y = ((true) ? Test.<@Nullable Integer>m(lst) : 10);
^
1 error
The text was updated successfully, but these errors were encountered:
Command
File
Actual behavior
The code passes the checks, but there's NPE
Expected behavior
The code should have been rejected with
The text was updated successfully, but these errors were encountered: