Incorrect usage of NonNullApi leads to incorrect quick fixes proposals and code analysis

I’m writing code that programatically deals with tables and columns.

There is a NonNullApi on components package level

But there are actually a whole bunch of methods that do return null. The result is that intelliJ now shows incorrect issues in analysis and proposes to simplify these methods.

Actually applying these quick fixes introduces bugs, since the methods are no longer null safe. And since this annotation is applied over the complete components package the chance of introducing bugs is quite high.

In fact, in the WebAbstractTable class alone there are 21 occurrences of returning null.

Thank you for pointing this out. Probably we underestimated the power of the hints and quick fixes.
We’ll fix the nullability declarations in Jmix.

1 Like