forked from phoedos/pmd
code cleanup: better XPath expression for ClassWithOnlyPrivateConstructorsShouldBeFinal
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.2.x@6704 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
parent
0252a9c905
commit
8cdc5bd985
@ -1407,9 +1407,7 @@ constructor is called by a inner class.
|
|||||||
TypeDeclaration[count(../TypeDeclaration) = 1]/ClassOrInterfaceDeclaration
|
TypeDeclaration[count(../TypeDeclaration) = 1]/ClassOrInterfaceDeclaration
|
||||||
[@Final = 'false']
|
[@Final = 'false']
|
||||||
[count(./ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration[@Private = 'true']) >= 1 ]
|
[count(./ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration[@Private = 'true']) >= 1 ]
|
||||||
[count(./ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration[@Public = 'true']) +
|
[count(./ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration[(@Public = 'true') or (@Protected = 'true') or (@PackagePrivate = 'true')]) = 0]
|
||||||
count(./ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration[@Protected = 'true']) +
|
|
||||||
count(./ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration[@PackagePrivate = 'true']) = 0 ]
|
|
||||||
[not(.//ClassOrInterfaceDeclaration)]
|
[not(.//ClassOrInterfaceDeclaration)]
|
||||||
]]></value>
|
]]></value>
|
||||||
</property>
|
</property>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user