-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
5.0
-
sparc
-
solaris_9
FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
jdk1.6.0 build 78 introduces an infinite recursive loop into
com.sun.xml.internal.stream.XMLOutputFactoryImpl.createXMLStreamWriter(javax.xml.transform.Result)
at line 93 of XMLOutputFactoryImpl.java
The call
public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(javax.xml.transform.Result result) throws javax.xml.stream.XMLStreamException {
if(result instanceof StreamResult){
return createXMLStreamWriter((StreamResult)result); // this is the infinite recursive loop
...
just calls back to itself, since there is no createXMLStreamWriter that takes a StreamResult as an argument.
You probably intended to call
javax.xml.stream.XMLStreamWriter createXMLStreamWriter(javax.xml.transform.stream.StreamResult sr, String encoding) throws javax.xml.stream.XMLStreamException {
defined on line 175, but that method takes an additional parameter (an encoding).
This bug was found using FindBugs, a static analysis defect detection tool for Java.
http://findbugs.sourceforge.net/
Bill Pugh
REPRODUCIBILITY :
This bug can be reproduced always.
A DESCRIPTION OF THE PROBLEM :
jdk1.6.0 build 78 introduces an infinite recursive loop into
com.sun.xml.internal.stream.XMLOutputFactoryImpl.createXMLStreamWriter(javax.xml.transform.Result)
at line 93 of XMLOutputFactoryImpl.java
The call
public javax.xml.stream.XMLStreamWriter createXMLStreamWriter(javax.xml.transform.Result result) throws javax.xml.stream.XMLStreamException {
if(result instanceof StreamResult){
return createXMLStreamWriter((StreamResult)result); // this is the infinite recursive loop
...
just calls back to itself, since there is no createXMLStreamWriter that takes a StreamResult as an argument.
You probably intended to call
javax.xml.stream.XMLStreamWriter createXMLStreamWriter(javax.xml.transform.stream.StreamResult sr, String encoding) throws javax.xml.stream.XMLStreamException {
defined on line 175, but that method takes an additional parameter (an encoding).
This bug was found using FindBugs, a static analysis defect detection tool for Java.
http://findbugs.sourceforge.net/
Bill Pugh
REPRODUCIBILITY :
This bug can be reproduced always.
- duplicates
-
JDK-6422391 Infinite recursive loop in XMLOutputFactoryImpl
-
- Resolved
-