JDK-6292315 : unexpected exception occurs in InputStreamReader
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio.charsets
  • Affected Version: 5.0,5.0u4,6
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000,windows_xp
  • CPU: x86
  • Submitted: 2005-06-29
  • Updated: 2014-02-27
  • Resolved: 2006-06-26
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2_13 b01Fixed
Related Reports
Duplicate :  
Description
unexpected exception occurs in InputStreamReader.

REPRODUCE :
 1) Compile the attached test program.
 2) Launch "java TEST1 TEST1.xml"
   You will see the message as follows.

C:\users\issues\unicode\TEST1>java -showversion TEST1 TEST1.xml
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode)

Exception in thread "main" java.lang.InternalError: Converter malfunction (Unico
deBig) -- please submit a bug report via http://java.sun.com/cgi-bin/bugreport.c
gi
        at sun.nio.cs.StreamDecoder$ConverterSD.malfunction(StreamDecoder.java:2
36)
        at sun.nio.cs.StreamDecoder$ConverterSD.convertInto(StreamDecoder.java:2
52)
        at sun.nio.cs.StreamDecoder$ConverterSD.implRead(StreamDecoder.java:298)

        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
        at sun.nio.cs.StreamDecoder.read0(StreamDecoder.java:132)
        at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:118)
        at java.io.InputStreamReader.read(InputStreamReader.java:151)
        at TEST1.main(TEST1.java:22)

CONFIGURSATION :
  JRE/JDK : 1.4.2/5.0u4
  OS : WindowsXP(SP1,Japanese)
  

###@###.### 2005-06-29 16:14:55 GMT

Comments
EVALUATION Aged bug, probably existed in day one, in ByteToCharUnicode.java. Weird no one noticed till now. See suggested fix for the fix for ByteToCharUnicode class. An alternative is to use the nio version in 5.0ux as well. ###@###.### 2005-07-21 07:10:34 GMT
21-07-2005

SUGGESTED FIX *** /tmp/geta4196 Thu Jul 21 00:02:00 2005 --- ByteToCharUnicode.java Thu Jul 21 00:01:51 2005 *************** *** 134,140 **** if (inI < inEnd) { b1 = in[inI++] & 0xff; bc = 1; ! } } else { badInputLength = bc; --- 134,141 ---- if (inI < inEnd) { b1 = in[inI++] & 0xff; bc = 1; ! } else ! byteOff = inI; } else { badInputLength = bc; ###@###.### 2005-07-21 07:10:33 GMT
21-07-2005