Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2116267 | 5.0 | Ramesh Mandava | P3 | Resolved | Fixed | beta |
Name: apR10229 Date: 09/26/2003
Filed By : SPB JCK team (###@###.###)
JDK : java full version "1.5.0-beta-b20"
JCK : 1.5
Platform[s] : Linux
switch/Mode :
JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
Failing Test [s] : N/A
Specification excerpt:
======================
--------- J2SE API spec v.1.5 ---------
public java.lang.String getNewLine()
...................
The default value for this attribute is null.
...
---------- end-of-excerpt ---------------
Problem description
===================
According to a API Spec, org.w3c.dom.ls.DOMSerializer.getNewLine() should return null
as a default value, but it returns CR+LF.
Minimized test:
===============
------- Test.java -------
import java.io.*;
import org.w3c.dom.ls.*;
import org.w3c.dom.*;
import javax.xml.parsers.*;
public class Test {
public static void main(String[] argv) {
Document doc = null;
try {
DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
doc = parser.parse(new StringBufferInputStream("<ROOT/>"));
} catch (Throwable e) {
e.printStackTrace();
}
DOMImplementationLS implLS = (DOMImplementationLS) doc.getImplementation().getFeature("LS","3.0");
DOMSerializer dw = implLS.createDOMSerializer();
if (dw.getNewLine() != null) {
System.out.println("FAILED: method does not return null by default!");
} else {
System.out.println("PASSED");
}
}
}
------- end-of-Test.java -------
Minimized test output:
======================
<pav@hammer(pts/6).266> java Test
FAILED: method does not return null by default!
JCK test source location:
==========================
/java/re/jck/1.5/promoted/latest/JCK-runtime-15/tests
Specific Machine Info:
=====================
Linux hammer 2.4.21 #1 Wed Jun 25 20:18:22 MSD 2003 i686 unknown
======================================================================
Filed By : SPB JCK team (###@###.###)
JDK : java full version "1.5.0-beta-b20"
JCK : 1.5
Platform[s] : Linux
switch/Mode :
JCK test owner : http://javaweb.eng/jct/sqe/JCK-tck/usr/owners.jto
Failing Test [s] : N/A
Specification excerpt:
======================
--------- J2SE API spec v.1.5 ---------
public java.lang.String getNewLine()
...................
The default value for this attribute is null.
...
---------- end-of-excerpt ---------------
Problem description
===================
According to a API Spec, org.w3c.dom.ls.DOMSerializer.getNewLine() should return null
as a default value, but it returns CR+LF.
Minimized test:
===============
------- Test.java -------
import java.io.*;
import org.w3c.dom.ls.*;
import org.w3c.dom.*;
import javax.xml.parsers.*;
public class Test {
public static void main(String[] argv) {
Document doc = null;
try {
DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
doc = parser.parse(new StringBufferInputStream("<ROOT/>"));
} catch (Throwable e) {
e.printStackTrace();
}
DOMImplementationLS implLS = (DOMImplementationLS) doc.getImplementation().getFeature("LS","3.0");
DOMSerializer dw = implLS.createDOMSerializer();
if (dw.getNewLine() != null) {
System.out.println("FAILED: method does not return null by default!");
} else {
System.out.println("PASSED");
}
}
}
------- end-of-Test.java -------
Minimized test output:
======================
<pav@hammer(pts/6).266> java Test
FAILED: method does not return null by default!
JCK test source location:
==========================
/java/re/jck/1.5/promoted/latest/JCK-runtime-15/tests
Specific Machine Info:
=====================
Linux hammer 2.4.21 #1 Wed Jun 25 20:18:22 MSD 2003 i686 unknown
======================================================================
- backported by
-
JDK-2116267 API method DOMSerializer.getNewLine() does not return a correct default value
-
- Resolved
-
- relates to
-
JDK-4937151 JCK1.5-runtime api/org_w3c/dom/ls/DOMSerializer/index.html#write fails
-
- Resolved
-