[java-analysis] NullityInferrer: don't try to add both annotations to a variable

The conditions are mutually exclusive logically, and the `else` keyword makes it explicit.

GitOrigin-RevId: cbb0b81fb4495f2ac74e7e190f9289a232bde2be
This commit is contained in:
Alexey Belkov
2023-11-28 11:50:53 +00:00
committed by intellij-monorepo-bot
parent ca6c111248
commit dfafd52e21
@@ -231,7 +231,7 @@ public class NullityInferrer {
if (variableNeverAssignedNull(variable)) {
registerNotNullAnnotation(variable);
}
if (variableSometimesAssignedNull(variable)) {
else if (variableSometimesAssignedNull(variable)) {
registerNullableAnnotation(variable);
}
}