views:

106

answers:

3

I am refactoring java 1.3 legacy code, around 700 classes. Due to the lack of generics in this code I see currently thousands of warnings, which of them should I simply disable? I don't wan't to discuss of every single warning, just a rule of thumb in terms of groups displayed in eclipses the errors/warnings dialog.

+1  A: 

Start with suppressing "unchecked/raw" warnings. That should clear up most of the issues related to generics

Kevin
+9  A: 

Ignore the warnings you don't care about... :)

I'd just take the first warning... if you don't understand it, research it. Once you understand it decide whether or not to ignore it.

Repeat until done :)

John Weldon
Your own judgment is your best friend. If you know what a warning means, and you are sure you know what you are doing, then tell the compiler to shut up.
Ramon Zarazua
A: 

`You're refactoring the code, right? If you do that.. you should refactor all code to use generic until you don't get any warning. You don't do that, your refactoring is not finished!

Supress the warning if you really need it, but do it very sparingly.

nanda