synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hubert, Eric" <Eric.Hub...@foxmobile.com>
Subject RE: Offer to support Synapse development
Date Sat, 14 Mar 2009 16:11:08 GMT
Hi Andreas,

> Is it possible to tell Findbugs and/or PMD to ignore specific false
> positives using annotations (either Javadoc style or Java 5)?
Sorry, I completely forgot to answer this question. In addition to specifying a specific ruleset
it is possible to deactivate a rule in a specific context. This should be accompanied with
a comment, of course.

As PMD works on the source code it is possible to use the normal @SuppressWarnings annotation
in the following format
@SuppressWarnings("PMD.rulename")

If you are working with Eclipse, you then have to ignore a warning of an unknown suppression,
or something like that (Eclipse compiler setting).
PMD recognizes this suppression.

Also see: 
http://pmd.sourceforge.net/suppressing.html


For Findbugs this can obviously not work, as Findbugs operates on the bytecode and the java.lang.SuppressWarnings
annotation has source not runtime rentention.
Therefore Findbugs defines its own Annotation:
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value="rulename")

Also see:
http://findbugs.sourceforge.net/manual/annotations.html


Regards,
  Eric
Mime
View raw message