forked from phoedos/pmd
StringBuffer -> StringBuilder switchovers
git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7333 51baf565-9d33-0410-a72c-fc3788e3496d
This commit is contained in:
@ -23,7 +23,7 @@ public class CSVRenderer implements Renderer {
|
||||
}
|
||||
|
||||
public String render(Iterator<Match> matches) {
|
||||
StringBuffer rpt = new StringBuffer(1000);
|
||||
StringBuilder rpt = new StringBuilder(1000);
|
||||
rpt.append("lines").append(separator);
|
||||
rpt.append("tokens").append(separator);
|
||||
rpt.append("occurrences");
|
||||
|
@ -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<Match> matches) {
|
||||
|
||||
StringBuffer rpt = new StringBuffer(300);
|
||||
StringBuilder rpt = new StringBuilder(300);
|
||||
|
||||
if (matches.hasNext()) {
|
||||
renderOn(rpt, matches.next());
|
||||
|
@ -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<Match> matches) {
|
||||
StringBuffer buffer = new StringBuffer(300);
|
||||
StringBuilder buffer = new StringBuilder(300);
|
||||
buffer.append("<?xml version=\"1.0\" encoding=\"");
|
||||
buffer.append(encoding);
|
||||
buffer.append("\"?>").append(PMD.EOL);
|
||||
|
Reference in New Issue
Block a user