forked from phoedos/pmd
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:
parent
9e0de88bc2
commit
7a7381829a
@ -408,8 +408,16 @@ Avoid using final local variables, turn them into fields.
|
|||||||
<properties>
|
<properties>
|
||||||
<property name="xpath">
|
<property name="xpath">
|
||||||
<value><![CDATA[
|
<value><![CDATA[
|
||||||
//LocalVariableDeclaration[@Final = 'true']
|
//LocalVariableDeclaration[
|
||||||
]]></value>
|
@Final = 'true'
|
||||||
|
and
|
||||||
|
(
|
||||||
|
(count(VariableDeclarator/VariableInitializer) = 0)
|
||||||
|
or
|
||||||
|
(VariableDeclarator/VariableInitializer/Expression/PrimaryExpression/PrimaryPrefix/Literal)
|
||||||
|
)
|
||||||
|
]
|
||||||
|
]]></value>
|
||||||
</property>
|
</property>
|
||||||
</properties>
|
</properties>
|
||||||
<example><![CDATA[
|
<example><![CDATA[
|
||||||
|
Loading…
x
Reference in New Issue
Block a user