开发者

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 e开发者_JAVA百科very single warning, just a rule of thumb in terms of groups displayed in eclipses the errors/warnings dialog.


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


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜