Disable adding of @Nullable annotation

Hi,

Is there a way to disable the adding of @Nullable annotations? We use Guava, and don't want the noise we get from the @Nullable annotation every time we add an anonymous Function/Predicate,

e.g. Intellij generates this:

        return new Predicate<String>() {
            @Override
            public boolean apply(@javax.annotation.Nullable String input) {
                return input.isEmpty();
            }
        };



which doesn't compile for us as we don't have annotations.jar in our project (and don't particularly want it), and adds unnecessary noise

Cheers,

Jim
9 comments
Comment actions Permalink

Hi,
it looks like http://youtrack.jetbrains.com/issue/IDEA-54779 which was fixed for IDEA 10. What is the IDEA version?
Thanks

0
Comment actions Permalink

We're on the latest and greatest - 11.1

0
Comment actions Permalink

Fixed. Thank you

0
Comment actions Permalink

Thanks Anna - is there a new YouTrack for that?

0
Comment actions Permalink

Actually no, I just fixed it yesterday,

0
Comment actions Permalink

How, exactly, was this fixed?  I am using IDEA 12.0.3, and the @Nullable annotation is still added when I do a smart complete for a new Function, Predicate, etc.  There needs to be a way to disable this.  I expected to find a template somewhere that I could modify, but I am not seeing one.

0
Comment actions Permalink

The initial issue was fixed:
if you don't have a jar available in the classpath - @Nullable/@NotNull annotations won't be added

0
Comment actions Permalink

IDEA 12.1.1 still having this problem.

0
Comment actions Permalink

Alex, what issue do you see? Please provide more details. Thanks

0

Please sign in to leave a comment.