diff --git a/pmd/etc/changelog.txt b/pmd/etc/changelog.txt index e96def49d5..1b0945f6fe 100644 --- a/pmd/etc/changelog.txt +++ b/pmd/etc/changelog.txt @@ -18,6 +18,7 @@ Fixed bug 1314086 - Added logging-jakarta-commons as a short name for rulesets/l Implemented RFE 1311309 - Suppressed RuleViolation counts are now included in the reports. Implemented RFE 1220371 - Rule violation suppression via annotations. Per the JLS, @SuppressWarnings can be placed before the following nodes: TYPE, FIELD, METHOD, PARAMETER, CONSTRUCTOR, LOCAL_VARIABLE. Applied patch 1306999 - Renamed CloseConnection to CloseResource and added support for checking Statement and ResultSet objects. +Renamed AvoidConcatenatingNonLiteralsInStringBuffer to InefficientStringBuffering; new name is a bit more concise. Implemented RFE 1275547 - OverrideBothEqualsAndHashcode now skips Comparator implementations. September 15, 2005 - 3.3: diff --git a/pmd/regress/test/net/sourceforge/pmd/rules/strings/AvoidConcatenatingNonLiteralsInStringBufferTest.java b/pmd/regress/test/net/sourceforge/pmd/rules/strings/InefficientStringBufferingTest.java similarity index 96% rename from pmd/regress/test/net/sourceforge/pmd/rules/strings/AvoidConcatenatingNonLiteralsInStringBufferTest.java rename to pmd/regress/test/net/sourceforge/pmd/rules/strings/InefficientStringBufferingTest.java index 6665e276f8..4acc87021d 100644 --- a/pmd/regress/test/net/sourceforge/pmd/rules/strings/AvoidConcatenatingNonLiteralsInStringBufferTest.java +++ b/pmd/regress/test/net/sourceforge/pmd/rules/strings/InefficientStringBufferingTest.java @@ -8,12 +8,12 @@ import net.sourceforge.pmd.Rule; import test.net.sourceforge.pmd.testframework.SimpleAggregatorTst; import test.net.sourceforge.pmd.testframework.TestDescriptor; -public class AvoidConcatenatingNonLiteralsInStringBufferTest extends SimpleAggregatorTst { +public class InefficientStringBufferingTest extends SimpleAggregatorTst { private Rule rule; public void setUp() throws Exception { - rule = findRule("strings", "AvoidConcatenatingNonLiteralsInStringBuffer"); + rule = findRule("strings", "InefficientStringBuffering"); } public void testAll() { diff --git a/pmd/rulesets/strings.xml b/pmd/rulesets/strings.xml index 62a363b182..f255deacf7 100644 --- a/pmd/rulesets/strings.xml +++ b/pmd/rulesets/strings.xml @@ -67,9 +67,9 @@ public class Foo { - + class="net.sourceforge.pmd.rules.InefficientStringBuffering"> Avoid concatenating non literals in a StringBuffer constructor or append(). diff --git a/pmd/src/net/sourceforge/pmd/rules/AvoidConcatenatingNonLiteralsInStringBuffer.java b/pmd/src/net/sourceforge/pmd/rules/InefficientStringBuffering.java similarity index 97% rename from pmd/src/net/sourceforge/pmd/rules/AvoidConcatenatingNonLiteralsInStringBuffer.java rename to pmd/src/net/sourceforge/pmd/rules/InefficientStringBuffering.java index d01dea75d2..fdf99169f7 100644 --- a/pmd/src/net/sourceforge/pmd/rules/AvoidConcatenatingNonLiteralsInStringBuffer.java +++ b/pmd/src/net/sourceforge/pmd/rules/InefficientStringBuffering.java @@ -21,7 +21,7 @@ import net.sourceforge.pmd.ast.Node; * * @author mgriffa */ -public class AvoidConcatenatingNonLiteralsInStringBuffer extends AbstractRule { +public class InefficientStringBuffering extends AbstractRule { public Object visit(ASTAdditiveExpression node, Object data) { ASTBlockStatement bs = (ASTBlockStatement) node.getFirstParentOfType(ASTBlockStatement.class);