@NotNull frustration


I just saw that there are some places in my code that could use better
NullPointer checking. "Hey, wasn't there a @Nullable and a @NotNull
annotation included with IDEA. Why not simply use that one?"

Well, if it were that simple, I wouldn't be posting here...

Step one: check module settings whether there is some kind of switch to
turn them on. Didn't turn up any results.

Step two: Maybe there's a jar in the IDEA application directory that I
need to include in my classpath. Nope -- at least I didn't find it...

Step three: Desperate people tend to do things they rarely do. I opened
up the online help and fired up the search function. Enter Nullable and
hey, there even is a result. But wait -- what's that? The entry only
contains something that looks like a missing image...

Step four: Online resources. At least, I found that these annotations
offer a real productivity boost. Good to know because I didn't
experience any yet.

Step five: Here I am... Common guys, I must have really missed something
obvious. Something that obvious that I should have seen it because it
was mentioned all over the place. Or you must be really kidding me... I
know that developers tend not to look into documentation but I think
this absolutely needs some improvement...


Dirk Dittert

Comment actions Permalink

Dirk Dittert <dittert@despammed.com> wrote:

Well, if I had looked into the right IDEA installation, I would have
found it. But still, I strongly believe I do have a point here...


Dirk Dittert

Comment actions Permalink

You certainly have a point. We are currently working on this issue and the
separate HowTo-type document will be published on the JetBrains site soon.


Please sign in to leave a comment.