Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[triquetrum-dev] FindBugs

Erwin,
I've set up FindBugs, see https://hudson.eclipse.org/triquetrum/job/triquetrum/findbugs

There are a bunch of warnings like https://hudson.eclipse.org/triquetrum/job/triquetrum/4/findbugsResult/module.232003606/
ErrorCode.java:26, NM_SAME_SIMPLE_NAME_AS_SUPERCLASS, Priority: High

The class name org.eclipse.triquetrum.validation.ErrorCode shadows the simple name of the superclass org.eclipse.triquetrum.ErrorCode

This class has a simple name that is identical to that of its superclass, except that its superclass is in a different package (e.g., alpha.Foo extends beta.Foo). This can be exceptionally confusing, create lots of situations in which you have to look at import statements to resolve references and creates many opportunities to accidently define methods that do not override methods in their superclasses.

One fix would be to rename org.eclipse.triquetrum.validation.ErrorCode to org.eclipse.triquetrum.validation.ErrorCodeValidation or something.

Or, we could ignore it.

I've found that fixing as many FindBugs warnings as possible is really helpful because it makes the actual bugs standout.  The downside of fixing these bugs is that some of the changes are not natural.

What are your thoughts?

_Christopher
-- 
Christopher Brooks, PMP                       University of California
Academic Program Manager & Software Engineer  US Mail: 337 Cory Hall
CHESS/iCyPhy/Ptolemy/TerraSwarm               Berkeley, CA 94720-1774
cxh@xxxxxxxxxxxxxxxxx, 707.332.0670           (Office: 545Q Cory)

Back to the top