JDK-6275348 : OutputStreamWriter does not set converter class in first constructor
  • Type: Bug
  • Component: xml
  • Sub-Component: jaxp
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2005-05-24
  • Updated: 2012-06-09
  • Resolved: 2007-12-10
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "1.6.0-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b37)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b37, mixed mode, sharing)

A DESCRIPTION OF THE PROBLEM :
When I wrap an OutputStream in an OutputStreamWriter and then send it to an XML Transformer to write to a file, I receive the following runtime warning:

Warning: Could not get charToByteConverterClass!

By default, a sensible converter class should be chosen.


REPRODUCIBILITY :
This bug can be reproduced always.
###@###.### 2005-05-24 17:34:02 GMT

Comments
EVALUATION Found this issue as part of cleaning up old bugs. Using the provided testcase, I verified that the error ouput "Warning: Could not get CharToByteConverterClass!" no longer appeared using jdk 1.6.0. Tested also using: jdk 1.5.0_11, and 1.6.0_02. Also found the issue had been fixed in CR 6333923.
10-12-2007

EVALUATION apache class src/share/classes/com/sun/org/apache/xml/internal/serializer/Encodings.java has static init code to load "sun.io.CharToByteConverter", it gives out warning message if the loading failed, which is always true after we removed the sun.io package from mustang. I dont see anyone uses the chartobyteconverter though. This static init code need to be removed, but this is apache code, need figure out how to remove it. ###@###.### 2005-06-10 06:17:22 GMT Iris pointed me to jaxp/jaxp/other. I would suggest (1)remove the converter loading code (2)and init that static variable to null. ###@###.### 2005-06-10 19:23:57 GMT
10-06-2005