Turning off "unchecked call to (method) as member of raw type (Collection)"

Hello,

Could someone please tell me how to disable the warning messages, "unchecked call to (method) as member of raw type (Collection)?" I can't seem to find this in the Settings.

An example of when this appears is:

Hashtable h = new Hashtable();
h.put( "Key", "Value" );

I am using 1.5.0 with Iriba #3144. I am using generics throughout the project, and so the Java level is set at 1.5.

Thanks for the help,
-Fred

6 comments
Comment actions Permalink

You have added the additional command-line parameter -Xlint:unchecked to
the compiler. You can remove it in Settings->Project
Settings->Compiler->Java Compiler->Additional command line parameters

Hope that helps,
R

0
Comment actions Permalink

Thanks for the response. There aren't any additional parameters in for javac though. This seems to be more of IntelliJ's own error-checking (like, for instance, producing warnings when objects are casted to concrete classes, when variables are declared but unused, etc), but again I don't see an option for it it the IDE settings. I'll take another look around and see what I can find.

-Fred

0
Comment actions Permalink

Sorry, I misunderstood. If there is an option to turn it off (I can't
find it) it would be in IDE settings->Errors.
There is "Raw use of parameterized class" in the "Abstraction issues"
section, but that's not it ...

Sorry I can't help more,
R

0
Comment actions Permalink

Fred Faber wrote:

Hello,

Could someone please tell me how to disable the warning messages, "unchecked call to (method) as member of raw type (Collection)?" I can't seem to find this in the Settings.


If you press Alt-Enter where the message appears, there should be an
option to configure this setting.

0
Comment actions Permalink

Fred Faber wrote:

Could someone please tell me how to disable the

warning messages, "unchecked call to (method) as
member of raw type (Collection)?" I can't seem to
find this in the Settings.

If you press Alt-Enter where the message appears,
there should be an
option to configure this setting.


There isn't one in this case. There are two ways I see to turn off the warning:
1. Invoke the "Generify" intention and actually use generics.
2. Decrease the language level.
And please file a request for enhancement.
http://www.intellij.net/tracker/idea/browse

Bas

0
Comment actions Permalink

I've done as you suggested. Thank you for your reply.

0

Please sign in to leave a comment.