We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Starting from version 0.11.0, NullAway reports false positive on a nullable variable after the switch expression:
public enum SomeEnum { A, B, } public int exhaustiveSwitch(SomeEnum e) { String s = null; switch (e) { case A -> { s = "A"; } case B -> throw new RuntimeException(); } return s.length(); // <-- warning: [NullAway] dereferenced expression s is @Nullable }
Runnable example
s at the return statement is non-nullable because the exhaustive switch either sets a value or makes the line unreachable.
s
return
Version 0.10.26 didn't report this warning.
The text was updated successfully, but these errors were encountered:
I can reproduce. Thanks for the report. I'll have to dig a bit deeper to understand what is going on here.
Sorry, something went wrong.
No branches or pull requests
Starting from version 0.11.0, NullAway reports false positive on a nullable variable after the switch expression:
Runnable example
s
at thereturn
statement is non-nullable because the exhaustive switch either sets a value or makes the line unreachable.Version 0.10.26 didn't report this warning.
The text was updated successfully, but these errors were encountered: