harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r825817 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/Writer.java
Date Fri, 16 Oct 2009 08:58:54 GMT
Author: tellison
Date: Fri Oct 16 08:58:53 2009
New Revision: 825817

URL: http://svn.apache.org/viewvc?rev=825817&view=rev
Log:
Part of HARMONY-6226 (Cannot build Apache CXF with Harmony)

Re-implement write(String) using write(String, int, int) and
re-implement write(String, int, int) using write(char[], int, int) to be consistent with RI
use of abstract methods.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/Writer.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/Writer.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/Writer.java?rev=825817&r1=825816&r2=825817&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/Writer.java (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/io/Writer.java Fri Oct
16 08:58:53 2009
@@ -143,11 +143,7 @@
      *             if this writer is closed or another I/O error occurs.
      */
     public void write(String str) throws IOException {
-        char buf[] = new char[str.length()];
-        str.getChars(0, buf.length, buf, 0);
-        synchronized (lock) {
-            write(buf);
-        }
+        write(str, 0, str.length());
     }
 
     /**
@@ -174,7 +170,7 @@
         str.getChars(offset, offset + count, buf, 0);
 
         synchronized (lock) {
-            write(buf);
+            write(buf, 0, buf.length);
         }
     }
 



Mime
View raw message