How to use : @noinspection

How do you use the '@noinspection' javadoc tag ?

Can you disable inspection for specific things? If so, how?

5 comments
Comment actions Permalink

By using quickfix to suppress inspection result.
Eugene.
"Nick Pratt" <no_mail@jetbrains.com> wrote in message
news:24220933.1116439997449.JavaMail.javamailuser@localhost...

How do you use the '@noinspection' javadoc tag ?

>

Can you disable inspection for specific things? If so, how?



0
Comment actions Permalink

Could you explain a little more please?

Perhaps an example in the help file of first, a warning being displayed, then how to disable that warning (is it on a per file/class basis or can you put that tag immediately before a specific line) ?

0
Comment actions Permalink

Nick,
you can disable warnings from inspections - just invoke one of "Suppress"
intentions for that inspection (they are now in options list).
It can be per statement/method/field/method. And now you can suppress our
inspections by @SuppressWarnings annotation.


--
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"


"Nick Pratt" <no_mail@jetbrains.com> wrote in message
news:339977.1116511472945.JavaMail.javamailuser@localhost...

Could you explain a little more please?

>

Perhaps an example in the help file of first, a warning being displayed,

then how to disable that warning (is it on a per file/class basis or can you
put that tag immediately before a specific line) ?


0
Comment actions Permalink

Yes, but how do you use this annotation - please show a code fragment with this annotation.

0
Comment actions Permalink

Here you are:

@SuppressWarnings("UNUSED_SYMBOL") public void foo() {
//noinspection LocalCanBeFinal
int i = 0;
}

But you needn't write them by hands.


--
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"


"Nick Pratt" <no_mail@jetbrains.com> wrote in message
news:31050353.1116606561445.JavaMail.javamailuser@localhost...

Yes, but how do you use this annotation - please show a code fragment with

this annotation.
>


0

Please sign in to leave a comment.