harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r616781 - /harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/InputStreamReaderTest.java
Date Wed, 30 Jan 2008 15:04:06 GMT
Author: tellison
Date: Wed Jan 30 07:03:53 2008
New Revision: 616781

URL: http://svn.apache.org/viewvc?rev=616781&view=rev
Log:
Fix test breakage when getting encoding back from InputStreamReader.

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

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/InputStreamReaderTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/InputStreamReaderTest.java?rev=616781&r1=616780&r2=616781&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/InputStreamReaderTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/test/api/common/org/apache/harmony/luni/tests/java/io/InputStreamReaderTest.java
Wed Jan 30 07:03:53 2008
@@ -300,8 +300,11 @@
      * @tests java.io.InputStreamReader#getEncoding()
      */
     public void test_getEncoding() throws IOException {
-        is = new InputStreamReader(fis, "8859_1");
-        assertEquals("Returned incorrect encoding", "8859_1", is.getEncoding());
+        try {
+            is = new InputStreamReader(fis, "8859_1");
+        } catch (UnsupportedEncodingException e) {
+            assertEquals("Returned incorrect encoding", "8859_1", is.getEncoding());
+        }
 
         InputStreamReader in = null;
         byte b[] = new byte[5];



Mime
View raw message