harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r770302 - /harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/FileInputStreamTest.java
Date Thu, 30 Apr 2009 15:54:29 GMT
Author: odeakin
Date: Thu Apr 30 15:54:29 2009
New Revision: 770302

URL: http://svn.apache.org/viewvc?rev=770302&view=rev
Log:
Minor change to ensure we read test data back in UTF-8.

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

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/FileInputStreamTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/FileInputStreamTest.java?rev=770302&r1=770301&r2=770302&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/FileInputStreamTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/FileInputStreamTest.java
Thu Apr 30 15:54:29 2009
@@ -19,6 +19,7 @@
 
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.InputStreamReader;
 import java.io.FileOutputStream;
 import java.io.FilePermission;
 import java.io.IOException;
@@ -109,9 +110,9 @@
      * @tests java.io.FileInputStream#read()
      */
     public void test_read() throws IOException {
-        is = new FileInputStream(fileName);
-        int c = is.read();
-        is.close();
+        InputStreamReader isr = new InputStreamReader(new FileInputStream(fileName));
+        int c = isr.read();
+        isr.close();
         assertTrue("read returned incorrect char", c == fileString.charAt(0));
     }
 



Mime
View raw message