diff --git a/pmd/rulesets/design.xml b/pmd/rulesets/design.xml index 720b7afefe..960f935145 100644 --- a/pmd/rulesets/design.xml +++ b/pmd/rulesets/design.xml @@ -1407,9 +1407,7 @@ constructor is called by a inner class. TypeDeclaration[count(../TypeDeclaration) = 1]/ClassOrInterfaceDeclaration [@Final = 'false'] [count(./ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration[@Private = 'true']) >= 1 ] -[count(./ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration[@Public = 'true']) + -count(./ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration[@Protected = 'true']) + -count(./ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration[@PackagePrivate = 'true']) = 0 ] +[count(./ClassOrInterfaceBody/ClassOrInterfaceBodyDeclaration/ConstructorDeclaration[(@Public = 'true') or (@Protected = 'true') or (@PackagePrivate = 'true')]) = 0] [not(.//ClassOrInterfaceDeclaration)] ]]>