Closed msridhar closed 10 months ago
There are various places in GenericsChecks that we only perform checks for ClassTypes, e.g.:
GenericsChecks
ClassType
https://github.com/uber/NullAway/blob/4b6e6728e0d0f82307884e333b6df07d501364bf/nullaway/src/main/java/com/uber/nullaway/generics/GenericsChecks.java#L304-L304 https://github.com/uber/NullAway/blob/4b6e6728e0d0f82307884e333b6df07d501364bf/nullaway/src/main/java/com/uber/nullaway/generics/GenericsChecks.java#L336-L338
I don't think these checks are needed, and in fact we may miss issues (e.g., if both types are array types and inside there are nested type arguments with mismatched nullability). We should remove these checks and add corresponding tests.
There are various places in
GenericsChecks
that we only perform checks forClassType
s, e.g.:https://github.com/uber/NullAway/blob/4b6e6728e0d0f82307884e333b6df07d501364bf/nullaway/src/main/java/com/uber/nullaway/generics/GenericsChecks.java#L304-L304 https://github.com/uber/NullAway/blob/4b6e6728e0d0f82307884e333b6df07d501364bf/nullaway/src/main/java/com/uber/nullaway/generics/GenericsChecks.java#L336-L338
I don't think these checks are needed, and in fact we may miss issues (e.g., if both types are array types and inside there are nested type arguments with mismatched nullability). We should remove these checks and add corresponding tests.