Skip to content

Commit 464e44a

Browse files
committed
fix nullaway warnings
1 parent a205054 commit 464e44a

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

nullaway/src/main/java/com/uber/nullaway/generics/GenericsChecks.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1706,6 +1706,9 @@ public void checkTypeParameterNullnessForFunctionReturnType(
17061706
formalReturnType,
17071707
false);
17081708
}
1709+
if (returnExpressionType == null) {
1710+
return;
1711+
}
17091712
boolean isReturnTypeValid =
17101713
subtypeParameterNullability(formalReturnType, returnExpressionType, state);
17111714
if (!isReturnTypeValid) {
@@ -2105,6 +2108,9 @@ public void compareGenericTypeParameterNullabilityForCall(
21052108
formalParameter,
21062109
false);
21072110
}
2111+
if (actualParameterType == null) {
2112+
return;
2113+
}
21082114
if (!subtypeParameterNullability(formalParameter, actualParameterType, state)) {
21092115
reportInvalidParametersNullabilityError(
21102116
formalParameter, actualParameterType, currentActualParam, state);

0 commit comments

Comments
 (0)