-
Bug
-
Resolution: Fixed
-
P2
-
1.4.2
-
b23
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2066750 | 5.0 | Ian Little | P2 | Resolved | Fixed | tiger |
The attached program and files will produce the following exception:
java.lang.ArrayIndexOutOfBoundsException: 8192
at sun.nio.cs.ext.EUC_TW$Decoder.decodeArrayLoop(EUC_TW.java:2252)
at sun.nio.cs.ext.EUC_TW$Decoder.decodeLoop(EUC_TW.java:2428)
at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:536)
at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:442)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.read(BufferedReader.java:157)
at CharsetIOStreamClassTest.runDecodingTest(CharsetIOStreamClassTest.java:83)
at CharsetIOStreamClassTest.main(CharsetIOStreamClassTest.java:43)
To compile/run the attached programs, do the following:
% javac CharsetIOStreamClassTest.java
% java CharsetIOStreamClassTest EUC_TW.b2c
The supporting classes will take the .b2c file and create a file 100,000 characters in size and will use this as the test data. The exception, however, will happen during the first read attempt from the stream.
This will not happen if you use the nio API or the String class. It only seems to happen when the io class is used.
###@###.### 2003-03-18
java.lang.ArrayIndexOutOfBoundsException: 8192
at sun.nio.cs.ext.EUC_TW$Decoder.decodeArrayLoop(EUC_TW.java:2252)
at sun.nio.cs.ext.EUC_TW$Decoder.decodeLoop(EUC_TW.java:2428)
at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:536)
at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:442)
at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:182)
at java.io.InputStreamReader.read(InputStreamReader.java:167)
at java.io.BufferedReader.fill(BufferedReader.java:136)
at java.io.BufferedReader.read(BufferedReader.java:157)
at CharsetIOStreamClassTest.runDecodingTest(CharsetIOStreamClassTest.java:83)
at CharsetIOStreamClassTest.main(CharsetIOStreamClassTest.java:43)
To compile/run the attached programs, do the following:
% javac CharsetIOStreamClassTest.java
% java CharsetIOStreamClassTest EUC_TW.b2c
The supporting classes will take the .b2c file and create a file 100,000 characters in size and will use this as the test data. The exception, however, will happen during the first read attempt from the stream.
This will not happen if you use the nio API or the String class. It only seems to happen when the io class is used.
###@###.### 2003-03-18
- backported by
-
JDK-2066750 Charset decoder throws exception when trying to decode EUC_TW encoded file.
-
- Resolved
-