Fixed bug 1988829 - Violation reported without source file name (actually a fix to ConsecutiveLiteralAppends)
Allowed rootNode to be defaulted whenever 'concurrentCount' is more than 0. This will allow a VariableDeclaration to be identified as the rootNode, even if it is never referenced later. JUnit tests pass, I hope this doesn't have unintended consequences. git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/branches/pmd/4.2.x@6184 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
Fixes for exclude-pattern
|
Fixes for exclude-pattern
|
||||||
Updates to RuleChain to honor RuleSet exclude-pattern
|
Updates to RuleChain to honor RuleSet exclude-pattern
|
||||||
|
Fixed bug 1988829 - Violation reported without source file name (actually a fix to ConsecutiveLiteralAppends)
|
||||||
|
|
||||||
May 20, 2008 - 4.2.2:
|
May 20, 2008 - 4.2.2:
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ public class ConsecutiveLiteralAppends extends AbstractRule {
|
|||||||
Map<VariableNameDeclaration, List<NameOccurrence>> decls = node.getScope().getVariableDeclarations();
|
Map<VariableNameDeclaration, List<NameOccurrence>> decls = node.getScope().getVariableDeclarations();
|
||||||
SimpleNode rootNode = null;
|
SimpleNode rootNode = null;
|
||||||
// only want the constructor flagged if it's really containing strings
|
// only want the constructor flagged if it's really containing strings
|
||||||
if (concurrentCount == 1) {
|
if (concurrentCount >= 1) {
|
||||||
rootNode = node;
|
rootNode = node;
|
||||||
}
|
}
|
||||||
for (Map.Entry<VariableNameDeclaration, List<NameOccurrence>> entry: decls.entrySet()) {
|
for (Map.Entry<VariableNameDeclaration, List<NameOccurrence>> entry: decls.entrySet()) {
|
||||||
|
Reference in New Issue
Block a user