forked from phoedos/pmd
Fixed spelling
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@4770 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -39,7 +39,7 @@ public class AppendCharacterWithChar extends AbstractRule {
|
||||
|
||||
Matcher matcher = REGEX.matcher(str);
|
||||
if (matcher.find()) {
|
||||
if (!InefficientStringBuffering.isInStringBufferOpperation(node, 8, "append")) {
|
||||
if (!InefficientStringBuffering.isInStringBufferOperation(node, 8, "append")) {
|
||||
return data;
|
||||
}
|
||||
addViolation(data, node);
|
||||
|
@ -104,7 +104,7 @@ public class ConsecutiveLiteralAppends extends AbstractRule {
|
||||
|
||||
currentBlock = getFirstParentBlock(n);
|
||||
|
||||
if (!InefficientStringBuffering.isInStringBufferOpperation(n, 3,"append")) {
|
||||
if (!InefficientStringBuffering.isInStringBufferOperation(n, 3,"append")) {
|
||||
if (!no.isPartOfQualifiedName()) {
|
||||
checkForViolation(rootNode, data, concurrentCount);
|
||||
concurrentCount = 0;
|
||||
|
@ -72,13 +72,13 @@ public class InefficientStringBuffering extends AbstractRule {
|
||||
if (isAllocatedStringBuffer(node)) {
|
||||
addViolation(data, node);
|
||||
}
|
||||
} else if (isInStringBufferOpperation(node, 6, "append")) {
|
||||
} else if (isInStringBufferOperation(node, 6, "append")) {
|
||||
addViolation(data, node);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
protected static boolean isInStringBufferOpperation(SimpleNode node, int length, String methodName) {
|
||||
protected static boolean isInStringBufferOperation(SimpleNode node, int length, String methodName) {
|
||||
if (!xParentIsStatementExpression(node, length)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -62,9 +62,9 @@ public class InsufficientStringBufferDeclaration extends AbstractRule {
|
||||
for (int ix = 0; ix < usage.size(); ix++) {
|
||||
NameOccurrence no = (NameOccurrence) usage.get(ix);
|
||||
SimpleNode n = no.getLocation();
|
||||
if (!InefficientStringBuffering.isInStringBufferOpperation(n, 3, "append")) {
|
||||
if (!InefficientStringBuffering.isInStringBufferOperation(n, 3, "append")) {
|
||||
|
||||
if (!no.isOnLeftHandSide() && !InefficientStringBuffering.isInStringBufferOpperation(n, 3, "setLength")) {
|
||||
if (!no.isOnLeftHandSide() && !InefficientStringBuffering.isInStringBufferOperation(n, 3, "setLength")) {
|
||||
continue;
|
||||
}
|
||||
if (constructorLength != -1 && anticipatedLength > constructorLength) {
|
||||
|
Reference in New Issue
Block a user