From: Nick Burch Date: Fri, 23 Aug 2013 18:30:01 +0000 (+0000) Subject: Inspired by github pull-6, use a StringBuilder for quicker string appending X-Git-Tag: REL_3_10_BETA2~11 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=106b8f3da8e099aa2b725d5691171c6d5e0fa27b;p=poi.git Inspired by github pull-6, use a StringBuilder for quicker string appending git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1516969 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/poi/ss/util/CellReference.java b/src/java/org/apache/poi/ss/util/CellReference.java index 10b4105551..c9bea9fd12 100644 --- a/src/java/org/apache/poi/ss/util/CellReference.java +++ b/src/java/org/apache/poi/ss/util/CellReference.java @@ -420,7 +420,7 @@ public class CellReference { // treat it as the 0th one int excelColNum = col + 1; - String colRef = ""; + StringBuilder colRef = new StringBuilder(2); int colRemain = excelColNum; while(colRemain > 0) { @@ -430,10 +430,10 @@ public class CellReference { // The letter A is at 65 char colChar = (char)(thisPart+64); - colRef = colChar + colRef; + colRef.append(colChar); } - return colRef; + return colRef.toString(); } /**