stacker
stacker

Reputation: 68942

What compiler warnings should I switch off?

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.

Upvotes: 1

Views: 209

Answers (3)

nanda
nanda

Reputation: 24788

`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.

Upvotes: 0

John Weldon
John Weldon

Reputation: 40749

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 :)

Upvotes: 9

Kevin
Kevin

Reputation: 30419

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

Upvotes: 1

Related Questions