Closed pompiuses closed 6 months ago
Hi @pompiuses this is not a bug. NullAway deliberately does not analyze code across procedure boundaries, to preserve scalability and incrementality. We can handle this case if you add a @Contract("null -> true")
annotation to isEmpty()
. See the documentation and let us know if it could be clearer or more prominent.
Environment: NullAway version: 0.10.23 Java 21 on Mac M1
I've got the following code:
Even though null is validated in method
isEmpty
NullAway gives an error ondisplay.length()
. I assume this is a bug?