src/share/classes/java/lang/Long.java

Print this page
rev 5431 : 6924259: Remove offset and count fields from java.lang.String
Summary: Removes the use of shared character array buffers by String along with the two fields needed to support the use of shared buffers.
Contributed-by: brian.doherty@oracle.com

@@ -371,11 +371,11 @@
         if (i == Long.MIN_VALUE)
             return "-9223372036854775808";
         int size = (i < 0) ? stringSize(-i) + 1 : stringSize(i);
         char[] buf = new char[size];
         getChars(i, size, buf);
-        return new String(0, size, buf);
+        return new String(buf, true);
     }
 
     /**
      * Returns a string representation of the argument as an unsigned
      * decimal value.