Java compiler warnings

Description

Currently, using the default settings in Eclipse for the Java compiler there are 2000+ warnings. Shouldn't these be addressed. I fear that many of them are quite valid and have actually found bugs in the past when fixing these warning. At least suppress the warnings that aren't fixable and add a TODO to readdress later. Which reminds me, there are a lot of TODOs that should also be addressed.

Environment

Operating System: All Platform: All

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Seth Leger July 11, 2013 at 11:18 AM

I believe that there are very few warnings that cause actual bugs in the code so I'm closing this issue. Virtually all of the warnings that are left as of 1.12 development are deprecation warnings and unused code warnings.

We have moved to using Sonar to detect static problems in the code which uncovers many more problems than simple compiler warnings.

Seth Leger August 16, 2011 at 3:39 PM

To provide an update, Ben and I have worked a lot on this over the last few months. We are down to about 200 deprecation warnings and 40 "unnecessary code" warnings but everything else has been resolved in our handwritten code. Some of the autogenerated code (Castor, Axis) has unresolvable warnings but we mask most of these using post-processing in the build.

The build is so clean that we talked last week about going through the code and marking more classes as deprecated so that the warning list provides a good TODO list of classes and subsystems that we would like to have go away at some point.

Seth Leger (community account) March 17, 2010 at 3:15 PM

In my Eclipse environment now, I have about 4300+ warnings on OpenNMS 1.7.10+. About 30% of these are due to 'Unnecessary @SuppressWarnings("unused")' warnings inside Castor classes. Many additional messages have to do with Java5 typing on java.lang.Class, also in the Castor classes.

We should probably bump Castor to the latest version and see if that helps.

Benjamin Reed March 13, 2008 at 2:29 PM

this is kind of a janitor task that we've slowly fixed over time; it's now probably worth bothering to do this more now that castor is updated

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

PagerDuty

Created February 20, 2008 at 8:21 PM
Updated January 27, 2017 at 4:25 PM
Resolved July 11, 2013 at 11:18 AM

Flag notifications