United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6600882 : toString(), hashCode() throw Exception

Details
Type:
Bug
Submit Date:
2007-09-04
Status:
Closed
Updated Date:
2012-04-25
Project Name:
JDK
Resolved Date:
2007-12-17
Component:
xml
OS:
generic
Sub-Component:
javax.xml.stream
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:
1.4.0 (1.4)

Related Reports
Backport:
Backport:

Sub Tasks

Description
XMLOutputFactory of = XMLOutputFactory.newInstance();
        XMLStreamWriter w = of.createXMLStreamWriter(new ByteArrayOutputStream());
        System.out.println(w);

The above code throws the following exception when run with JDK6.

Exception in thread "main" java.lang.UnsupportedOperationException
        at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.entrySet(XMLStreamWriterImpl.java:2126)
        at java.util.AbstractMap.toString(AbstractMap.java:478)
        at java.lang.String.valueOf(String.java:2827)
        at java.io.PrintStream.println(PrintStream.java:771)
        at WhichSjsxp.main(WhichSjsxp.java:21)

                                    

Comments
EVALUATION

Fixed in JAXP 1.4 on java.net. Will consider integrating into jdk6 update release.
                                     
2007-09-06



Hardware and Software, Engineered to Work Together