mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-23 14:19:56 +00:00
8081392: getNodeValue should return 'null' value for Element nodes
Reviewed-by: joehw
This commit is contained in:
parent
adc531d210
commit
d78a5bc2c1
@ -26,8 +26,9 @@ import org.w3c.dom.Node;
|
||||
public class TestFunc {
|
||||
|
||||
public static String test(Node node) {
|
||||
String s = node.getTextContent();
|
||||
return s;
|
||||
String textContent = node.getTextContent();
|
||||
String nodeValue = node.getNodeValue();
|
||||
return textContent + ":" + nodeValue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -23,9 +23,10 @@
|
||||
|
||||
/**
|
||||
* @test
|
||||
* @bug 8032908
|
||||
* @bug 8032908 8081392
|
||||
* @summary Test if Node.getTextContent() function correctly returns children
|
||||
* content
|
||||
* content and also check that Node.getNodeValue() returns null value for
|
||||
* Element nodes
|
||||
* @compile TestFunc.java XSLT.java
|
||||
* @run main/othervm XSLT
|
||||
*/
|
||||
@ -40,7 +41,7 @@ public class XSLT {
|
||||
|
||||
static final String XMLTOTRANSFORM = "/in.xml";
|
||||
static final String XSLTRANSFORMER = "/test.xsl";
|
||||
static final String EXPECTEDRESULT = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>ABCDEFG";
|
||||
static final String EXPECTEDRESULT = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>ABCDEFG:null";
|
||||
|
||||
public static void main(String[] args) throws TransformerException {
|
||||
ByteArrayOutputStream resStream = new ByteArrayOutputStream();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user