harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r423942 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/StringBuilder.java
Date Thu, 20 Jul 2006 14:20:08 GMT
Author: tellison
Date: Thu Jul 20 07:20:08 2006
New Revision: 423942

URL: http://svn.apache.org/viewvc?rev=423942&view=rev
Log:
Implement toString() to workaround javac bug.

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/StringBuilder.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/StringBuilder.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/StringBuilder.java?rev=423942&r1=423941&r2=423942&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/StringBuilder.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/lang/StringBuilder.java
Thu Jul 20 07:20:08 2006
@@ -700,6 +700,20 @@
     }
 
     /**
+     * Answers the contents of this StringBuilder.
+     * 
+     * @return a String containing the characters in this StringBuilder
+     */
+    public String toString() {
+        /* Note: This method is required to workaround a compiler bug
+         * in the RI javac (at least in 1.5.0_06) that will generate a
+         * reference to the non-public AbstractStringBuilder if we don't
+         * override it here.
+         */
+        return super.toString();
+    }
+
+    /**
      * <p>
      * Reads the state of a <code>StringBuilder</code> from the passed stream
      * and restores it to this instance.



Mime
View raw message