how do "@NotNull" and "@Nullable" work ?

i have no idea how to use those annotations. idea says that it can use them to warn about NPEs, but build 3417 either ignores them, or i'm using them wrong...
(created an public @interface Nullable)

2 comments
Comment actions Permalink

it's said on the "whats new"-page. but it's not said how it works. actually, i haven't found a single explanation von annotations at all. what are they ?

0
Comment actions Permalink

Fake wrote:

i have no idea how to use those annotations. idea says that it can use them to warn about NPEs, but build 3417 either ignores them, or i'm using them wrong...
(created an public @interface Nullable)

There's a file annotations.jar under IDEA/redist folder. Add it to your
classpath and use the annotations in org.jetbrains.annotations.

0

Please sign in to leave a comment.