Final fix

git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.2.x@6824 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
Romain Pelisse 2009-02-08 21:57:20 +00:00
parent 9e0de88bc2
commit 7a7381829a

View File

@ -408,8 +408,16 @@ Avoid using final local variables, turn them into fields.
<properties>
<property name="xpath">
<value><![CDATA[
//LocalVariableDeclaration[@Final = 'true']
]]></value>
//LocalVariableDeclaration[
@Final = 'true'
and
(
(count(VariableDeclarator/VariableInitializer) = 0)
or
(VariableDeclarator/VariableInitializer/Expression/PrimaryExpression/PrimaryPrefix/Literal)
)
]
]]></value>
</property>
</properties>
<example><![CDATA[