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
In particular, we model Guava Functions as having a @NonNull return, but if you write (x) -> null and pass it as a Guava Function currently NullAway does not report an error. In contrast, writing (x) -> { return null; } yields an error. This should be relatively easy to fix, but it will lead to new errors when users do a NullAway update.
The text was updated successfully, but these errors were encountered:
In our handling of lambdas, we immediately bail out of all checking if the corresponding functional interface method is unannotated:
NullAway/nullaway/src/main/java/com/uber/nullaway/NullAway.java
Lines 957 to 959 in 084bd96
But, this skips a check that is later performed for return types, where we allow library models to override return type nullability:
NullAway/nullaway/src/main/java/com/uber/nullaway/NullAway.java
Lines 875 to 877 in 084bd96
In particular, we model Guava
Function
s as having a@NonNull
return, but if you write(x) -> null
and pass it as a GuavaFunction
currently NullAway does not report an error. In contrast, writing(x) -> { return null; }
yields an error. This should be relatively easy to fix, but it will lead to new errors when users do a NullAway update.The text was updated successfully, but these errors were encountered: