From a85a9cd3c5818fad345e6fd725135c8fe1d79d06 Mon Sep 17 00:00:00 2001 From: Brian Remedios Date: Sat, 24 Sep 2011 05:15:06 +0000 Subject: [PATCH] StringBuffer -> StringBuilder switchovers git-svn-id: https://pmd.svn.sourceforge.net/svnroot/pmd/trunk@7331 51baf565-9d33-0410-a72c-fc3788e3496d --- pmd/src/net/sourceforge/pmd/cpd/VSRenderer.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pmd/src/net/sourceforge/pmd/cpd/VSRenderer.java b/pmd/src/net/sourceforge/pmd/cpd/VSRenderer.java index 64e0e720da..10ac5afe2b 100644 --- a/pmd/src/net/sourceforge/pmd/cpd/VSRenderer.java +++ b/pmd/src/net/sourceforge/pmd/cpd/VSRenderer.java @@ -10,14 +10,16 @@ import java.util.Iterator; public class VSRenderer implements Renderer { public String render(Iterator matches) { - StringBuffer buffer = new StringBuffer(300); + + StringBuilder buffer = new StringBuilder(300); + for (Match match; matches.hasNext();) { match = matches.next(); TokenEntry mark; for (Iterator iterator = match.iterator(); iterator.hasNext();) { mark = iterator.next(); buffer.append(mark.getTokenSrcID()); - buffer.append("(" + mark.getBeginLine() +"):"); + buffer.append('(').append(mark.getBeginLine()).append("):"); buffer.append(" Between lines " + mark.getBeginLine() + " and " + (mark.getBeginLine()+match.getLineCount()) + PMD.EOL); } }