cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glynn, Eoghan" <eoghan.gl...@iona.com>
Subject More odd PMD-related build failures
Date Thu, 26 Oct 2006 16:20:24 GMT


Folks,

Some questionable PMD violations have popped up in my builds after
updating to the commits that have gone in over the last few days. Not
sure why this doesn't seem to be impacting on the cruisecontrol builds
(maybe its running with -Pnochecks).

The first[1] seems to be a kosher warning, but the detail (line number
etc.) is lost, seemingly because the method is annotated with
@SuppressWarnings. This is broken ... PMD shouldn't be effected by a
@SupressWarnings annotation, but even it is, it should be fully
supressed not just stripped of any useful detail but still causing the
build to fail. In this particular class, there are only a few nested
ifs, so its clear where the bad code is, but still annoying.

The second[2] is spurious and seems to be caused by
AbstractEndpointFactory having both public and private methods called
setProperties().

The third[3] is another example of PMD's maddening stupidity when a
method name is overloaded (IriDecoderHelper.getElement()).

I'm also seeing PMD just completely dying on me when building
rt/ws/addr, arghh!

All in all I like PMD less and less, but as long as we're stuck with it,
PLEASE be sure to run a full PMD check before committing.

/Eoghan


[1] rt/frontend/jaxws/target/pmd.xml:
<?xml version="1.0" encoding="UTF-8"?>
<pmd version="3.6" timestamp="2006-10-26T15:29:03.979" elapsedTime="0s">
<suppressedviolation
filename="/work/cxf/work_25Sept2006/trunk/rt/frontend/jaxws/src/main/jav
a/org/apache/cxf/jaxws/interceptors/DispatchOutInterceptor.java"
suppressiontype="annotation" msg="These nested if statements could be
combined"/>
</pmd>

[2] rt/frontend/simple/target/pmd.xml:
<?xml version="1.0" encoding="UTF-8"?>
<pmd version="3.6" timestamp="2006-10-26T15:51:15.576" elapsedTime="0s">
<file
name="/work/cxf/work_25Sept2006/trunk/rt/frontend/simple/src/main/java/o
rg/apache/cxf/service/factory/AbstractEndpointFactory.java">
<violation line="81" rule="UnusedPrivateMethod" ruleset="Unused Code
Rules" package="org.apache.cxf.service.factory"
class="AbstractEndpointFactory" method="setProperties"
externalInfoUrl="http://pmd.sourceforge.net/rules/unusedcode.html#Unused
PrivateMethod" priority="3">
Avoid unused private methods such as 'setProperties(EndpointInfo)'
</violation>
</file>
</pmd>

[3] rt/bindings/http/target/pmd.xml:
<?xml version="1.0" encoding="UTF-8"?>
<pmd version="3.6" timestamp="2006-10-26T16:15:12.435" elapsedTime="0s">
<file
name="/work/cxf/work_25Sept2006/trunk/rt/bindings/http/src/main/java/org
/apache/cxf/binding/http/IriDecoderHelper.java">
<violation line="247" rule="UnusedPrivateMethod" ruleset="Unused Code
Rules" package="org.apache.cxf.binding.http" class="IriDecoderHelper"
method="getElement"
externalInfoUrl="http://pmd.sourceforge.net/rules/unusedcode.html#Unused
PrivateMethod" priority="3">
Avoid unused private methods such as 'getElement(Element,int)'
</violation>
</file>
</pmd>

Mime
View raw message