Author: nick
Date: Fri Aug 23 18:30:01 2013
New Revision: 1516969

URL: http://svn.apache.org/r1516969
Log:
Inspired by github pull-6, use a StringBuilder for quicker string appending

Modified:
    poi/trunk/src/java/org/apache/poi/ss/util/CellReference.java

Modified: poi/trunk/src/java/org/apache/poi/ss/util/CellReference.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ss/util/CellReference.java?rev=1516969&r1=1516968&r2=1516969&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ss/util/CellReference.java (original)
+++ poi/trunk/src/java/org/apache/poi/ss/util/CellReference.java Fri Aug 23 
18:30:01 2013
@@ -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();
        }
 
        /**



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to