Limits of null dereference checking

Are there limits to the null inspections scope. Wondering why I'm seeing these despite being wrapped by commons collections helpers?

capture.jpg

3 comments
Comment actions Permalink

Annotate Commons Collections sourced from public maven repo with IntelliJ IDEA annotations? I suppose I could - but thats very unlikely.

0
Comment actions Permalink

It is possible to annotate 3rd party library externally. Make sure that you have library sources configured correctly, navigate to isNotEmpty() method and invoke intentions (Alt+Enter on Windows). Undortunately there's no intention yet that suggests @Contract, but you can add @Nullable or @NotNull and then edit created xml file manually. I didn't try yet, but I think it should work.

I've found an example:http://blog.jetbrains.com/kotlin/using-external-annotations/

0

Please sign in to leave a comment.