@Contract annotation

Is there any way to teach IDEA that the following performs a null check?

assertThat(someObject, notNullValue());



Thanks. Not so smart is relative. I spent some time comparing the Eclipse static analyzer with IDEA. Let's put it that way: if you want to see not so smart, try Eclipse. Unfortunately, most projects require it...

Speaking of compatibility: It would be nice if @Contract could be extended to cover resources as well. I have added an example to IDEA-72042.


Please sign in to leave a comment.