Unchecked or unsafe operations????
Hi, I am programming under linux and I am reading single-word strings on separate lines of a file and adding them to a TreeSet object. Everything works fine and the TreeSet has the proper items, but I get the following warnings on the command line when I compile:
Note: foo.java uses unchecked or unsafe operations.
Note: Recompile with -xlint:unchecked for details.
Now, I've narrowed it down to the exact lines of code that cause this to happen; here they are:
try {
while ((myStr = in.readLine ()) ! = null)
myTreeSet.add (myStr);
}
catch (IOException e1) {
// blah blah
}
catch (ClassCastException e2) {
// blah blah
}
And this couldnt' possibly be due to my ignoring that boolean val returned when a TreeSet object adds. Please help. Thank you.
Sean
|