harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r790941 - /harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedOutputStreamTest.java
Date Fri, 03 Jul 2009 15:10:59 GMT
Author: odeakin
Date: Fri Jul  3 15:10:58 2009
New Revision: 790941

URL: http://svn.apache.org/viewvc?rev=790941&view=rev
Log:
Ensure getBytes() does not use the native encoding for non-ASCII platforms.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedOutputStreamTest.java

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedOutputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedOutputStreamTest.java?rev=790941&r1=790940&r2=790941&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedOutputStreamTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/BufferedOutputStreamTest.java
Fri Jul  3 15:10:58 2009
@@ -673,7 +673,7 @@
     public void test_write_Scenario1() throws IOException {
         ByteArrayOutputStream byteArrayos = new ByteArrayOutputStream();
         ByteArrayInputStream byteArrayis = null;
-        byte[] buffer = "1234567890".getBytes();
+        byte[] buffer = "1234567890".getBytes("UTF-8");
 
         BufferedOutputStream buffos = new BufferedOutputStream(byteArrayos, 10);
         buffos.write(buffer, 0, 10);
@@ -722,7 +722,7 @@
     public void test_write_Scenario2() throws IOException {
         ByteArrayOutputStream byteArrayos = new ByteArrayOutputStream();
         ByteArrayInputStream byteArrayis = null;
-        byte[] buffer = "1234567890".getBytes();
+        byte[] buffer = "1234567890".getBytes("UTF-8");
 
         BufferedOutputStream buffos = new BufferedOutputStream(byteArrayos, 20);
         buffos.write(buffer, 0, 10);
@@ -783,7 +783,7 @@
     public void test_write_Scenario3() throws IOException {
         ByteArrayOutputStream byteArrayos = new ByteArrayOutputStream();
         ByteArrayInputStream byteArrayis = null;
-        byte[] buffer = "1234567890".getBytes();
+        byte[] buffer = "1234567890".getBytes("UTF-8");
 
         BufferedOutputStream buffos = new BufferedOutputStream(byteArrayos, 5);
         buffos.write(buffer, 0, 4);



Mime
View raw message