Why supress inspection inserts /** @noinspection unchecked*/ rather then @SuppressWarnings({"unchecked"})
Hello,
obviously /** @noinspection unchecked*/ is a proprietary IDEA thing and
does not help wit javac warnings. While it is the only option with some
statements I do not see why it should be so for methods and classes
I am pretty sure in prior builds it did use @SuppressWarnings({"unchecked"})
but then it swithed to /** @noinspection unchecked*/ which si useless as
far as javac is concerned
Is it configurable?
Thank you
Alex
Please sign in to leave a comment.
Because of JDK ;)
Hello,
and used language level ;)
-
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
You lost me :)
I use JDK 1.6 which honors @SuppressWarnings({"unchecked"}) and language
level is set to 5 what am I missing?
"Anna Kozlova" <Anna.Kozlova@jetbrains.com > wrote in message
news:c8a8941e1c1d88c8c1e39bd26ddd@news.intellij.net...
>
>
>
>> Because of JDK ;)
>>
>
I think somewhere in IDEA's source code contains
;)
where did you get this 1.3 thing from. Did I mantion it anywhere in my
original post? If I did, it must have been late at night
"t800t8" <no_reply@jetbrains.com> wrote in message
news:6715158.1161333024637.JavaMail.itn@is.intellij.net...
>
There's a setting in the IDE Settings under Editor -> Behavior -> "Suppress with
@SuppressWarnings" (bottom right corner). I think it used to be in the "Errors"
category which I would consider more appropriate.
Sascha
Alex Roytman wrote:
Ooops, please read my post carefully
Better way to mention it
if (JDK's version == "1.5") {
You can use @SuppressWarnings
} else {
Wait for later versions
}
Right, Sascha. But you miss "for 5.0 only".
I have same problem with Alex when use JDK 1.6 and set language level to 5 in my projects. So I think IDEA considers JDK's version first.
Hello Alex,
this is a bug.
Thank you
-
Anna Kozlova
JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
>> Now you lost ;)
>>
>> IDEA cares about JDK version first. At this time IDEA does not
>> support JDK 1.6 so it treat as 1.3 (as I guess). I can't imagine how
>> you can build your project with JDK 1.3 but set language level to 5.
>>
I don't think it's a bug.
At this time IDEA only supports JDK 1.5 and before. Assumes that in JDK 1.6, Sun deprecates @SupressWarning and replaces by @IgnoreStupidComplain, what will happen?
IDEA doesn't know how to treat with JDK 1.6, so it treats as 1.3, it's a normal way.