Author: ggregory
Date: Mon Jul 18 17:19:05 2011
New Revision: 1147977
URL: http://svn.apache.org/viewvc?rev=1147977&view=rev
Log:
Implement sebb's suggestions. Thank you Sebb.
Modified:
commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/ReaderInputStreamTest.java
Modified:
commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/ReaderInputStreamTest.java
URL:
http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/ReaderInputStreamTest.java?rev=1147977&r1=1147976&r2=1147977&view=diff
==============================================================================
---
commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/ReaderInputStreamTest.java
(original)
+++
commons/proper/io/trunk/src/test/java/org/apache/commons/io/input/ReaderInputStreamTest.java
Mon Jul 18 17:19:05 2011
@@ -120,13 +120,9 @@ public class ReaderInputStreamTest {
@Ignore
public void testCharsetMismatchInfiniteLoop() throws IOException {
// Input is UTF-8 bytes: 0xE0 0xB2 0xA0
- byte[] input = new byte[] { (byte) 0xE0, (byte) 0xB2, (byte) 0xA0 };
char[] inputChars = new char[] { (char) 0xE0, (char) 0xB2, (char) 0xA0
};
- System.out.println("Input: " + new String(input,
Charset.forName("UTF-8")));
-
// Charset charset = Charset.forName("UTF-8"); // works
Charset charset = Charset.forName("ASCII"); // infinite loop
-
ReaderInputStream stream = new ReaderInputStream(new
CharArrayReader(inputChars), charset);
try {
while (stream.read() != -1) {
@@ -134,6 +130,5 @@ public class ReaderInputStreamTest {
} finally {
stream.close();
}
-
}
}