diff --git a/pmd/rulesets/basic.xml b/pmd/rulesets/basic.xml index 40a5b8313f..d812fc87b8 100644 --- a/pmd/rulesets/basic.xml +++ b/pmd/rulesets/basic.xml @@ -135,7 +135,8 @@ The Basic Ruleset contains a collection of good practices which everyone should @@ -199,7 +200,8 @@ The Basic Ruleset contains a collection of good practices which everyone should @@ -282,11 +284,14 @@ The Basic Ruleset contains a collection of good practices which everyone should [ (@Image = 'equals' and count(FormalParameters/*) = 1 - and not(//MethodDeclarator[count(FormalParameters/*) = 0][@Image = 'hashCode']) + and not(//MethodDeclarator[count(FormalParameters/*) = 0] + [@Image = 'hashCode']) or (@Image='hashCode' and count(FormalParameters/*) = 0 - and not(//MethodDeclarator[count(FormalParameters//Type/Name[@Image = 'Object']) = 1][@Image = 'equals'])) + and not(//MethodDeclarator[count(FormalParameters//Type/Name + [@Image = 'Object']) = 1] + [@Image = 'equals'])) )] ]]> diff --git a/pmd/rulesets/controversial.xml b/pmd/rulesets/controversial.xml index 8b64302606..0950b831dd 100644 --- a/pmd/rulesets/controversial.xml +++ b/pmd/rulesets/controversial.xml @@ -19,7 +19,8 @@ most people really dislike :-) @@ -120,7 +121,7 @@ most people really dislike :-) diff --git a/pmd/rulesets/junit.xml b/pmd/rulesets/junit.xml index 38f2c5bde6..bdce96e812 100644 --- a/pmd/rulesets/junit.xml +++ b/pmd/rulesets/junit.xml @@ -15,7 +15,8 @@ These rules deal with different problems that can occur with JUnit tests. @@ -44,7 +45,11 @@ These rules deal with different problems that can occur with JUnit tests.