commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1470288 - /commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/CharSequenceInputStreamTest.java
Date Sun, 21 Apr 2013 11:50:07 GMT
Author: sebb
Date: Sun Apr 21 11:50:07 2013
New Revision: 1470288

URL: http://svn.apache.org/r1470288
Log:
Not all charsets support encoding; fix up ignored test so it no longer fails

Modified:
    commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/CharSequenceInputStreamTest.java

Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/CharSequenceInputStreamTest.java
URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/CharSequenceInputStreamTest.java?rev=1470288&r1=1470287&r2=1470288&view=diff
==============================================================================
--- commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/CharSequenceInputStreamTest.java
(original)
+++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/CharSequenceInputStreamTest.java
Sun Apr 21 11:50:07 2013
@@ -81,16 +81,13 @@ public class CharSequenceInputStreamTest
         }
     }
 
-    /**
-     * Fails with java.lang.UnsupportedOperationException at sun.nio.cs.ext.ISO2022_CN.newEncoder(Unknown
Source).
-     * Probably not a good idea to use {@link Charset#availableCharsets()} because any encoding
can fail for any
-     * reason.
-     */
     @Test
-    @Ignore
     public void testBufferedRead_AvailableCharset() throws IOException {
         for (final String csName : Charset.availableCharsets().keySet()) {
-            testBufferedRead(TEST_STRING, csName);
+            // prevent java.lang.UnsupportedOperationException at sun.nio.cs.ext.ISO2022_CN.newEncoder.

+            if (Charset.forName(csName).canEncode()) {
+                testBufferedRead(TEST_STRING, csName);
+            }
         }
     }
 



Mime
View raw message