From 571dc30668c50ddcdec2b5161022b394f4cfc4c8 Mon Sep 17 00:00:00 2001 From: Brian Remedios Date: Sat, 24 Sep 2011 05:32:54 +0000 Subject: [PATCH] StringBuffer -> StringBuilder switchovers git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7333 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd/src/net/sourceforge/pmd/cpd/CSVRenderer.java | 2 +- pmd/src/net/sourceforge/pmd/cpd/SimpleRenderer.java | 4 ++-- pmd/src/net/sourceforge/pmd/cpd/XMLRenderer.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pmd/src/net/sourceforge/pmd/cpd/CSVRenderer.java b/pmd/src/net/sourceforge/pmd/cpd/CSVRenderer.java index ef483342ad..98077b93cc 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/CSVRenderer.java +++ b/pmd/src/net/sourceforge/pmd/cpd/CSVRenderer.java @@ -23,7 +23,7 @@ public class CSVRenderer implements Renderer { } public String render(Iterator matches) { - StringBuffer rpt = new StringBuffer(1000); + StringBuilder rpt = new StringBuilder(1000); rpt.append("lines").append(separator); rpt.append("tokens").append(separator); rpt.append("occurrences"); diff --git a/pmd/src/net/sourceforge/pmd/cpd/SimpleRenderer.java b/pmd/src/net/sourceforge/pmd/cpd/SimpleRenderer.java index 11d628d71b..d0d844d9db 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/SimpleRenderer.java +++ b/pmd/src/net/sourceforge/pmd/cpd/SimpleRenderer.java @@ -28,7 +28,7 @@ public class SimpleRenderer implements Renderer { separator = theSeparator; } - private void renderOn(StringBuffer rpt, Match match) { + private void renderOn(StringBuilder rpt, Match match) { rpt.append("Found a ").append(match.getLineCount()).append(" line (").append(match.getTokenCount()).append(" tokens) duplication in the following files: ").append(PMD.EOL); @@ -59,7 +59,7 @@ public class SimpleRenderer implements Renderer { public String render(Iterator matches) { - StringBuffer rpt = new StringBuffer(300); + StringBuilder rpt = new StringBuilder(300); if (matches.hasNext()) { renderOn(rpt, matches.next()); diff --git a/pmd/src/net/sourceforge/pmd/cpd/XMLRenderer.java b/pmd/src/net/sourceforge/pmd/cpd/XMLRenderer.java index 774d211fb3..55b1df501c 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/XMLRenderer.java +++ b/pmd/src/net/sourceforge/pmd/cpd/XMLRenderer.java @@ -20,7 +20,7 @@ public class XMLRenderer implements Renderer { } public XMLRenderer(String e) { - this.encoding = e; + encoding = e; } // FUTURE: Use a XML API - rather than StringBuffer to generate XML Report. @@ -28,7 +28,7 @@ public class XMLRenderer implements Renderer { // also allow us to get ride of the encode below, as the XML API choosed will // do that for us... public String render(Iterator matches) { - StringBuffer buffer = new StringBuffer(300); + StringBuilder buffer = new StringBuilder(300); buffer.append("").append(PMD.EOL);