Mercurial > hg > release > icedtea8-forest-3.0 > jaxp
changeset 1019:60e857ca1245
8081392: getNodeValue should return 'null' value for Element nodes
Reviewed-by: joehw
author | aefimov |
---|---|
date | Sun, 31 May 2015 18:54:58 +0300 |
parents | ee389d2cb785 |
children | a331502573b9 1c4d3cadfd38 |
files | src/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeProxy.java src/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java |
diffstat | 2 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeProxy.java Wed May 27 13:20:54 2015 -0700 +++ b/src/com/sun/org/apache/xml/internal/dtm/ref/DTMNodeProxy.java Sun May 31 18:54:58 2015 +0300 @@ -2116,7 +2116,7 @@ */ @Override public String getTextContent() throws DOMException { - return getNodeValue(); // overriden in some subclasses + return dtm.getStringValue(node).toString(); } /**
--- a/src/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java Wed May 27 13:20:54 2015 -0700 +++ b/src/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM2.java Sun May 31 18:54:58 2015 +0300 @@ -3145,11 +3145,7 @@ m_data.elementAt(-dataIndex+1)); } } - else if (DTM.ELEMENT_NODE == type) - { - return getStringValueX(nodeHandle); - } - else if (DTM.DOCUMENT_FRAGMENT_NODE == type + else if (DTM.ELEMENT_NODE == type || DTM.DOCUMENT_FRAGMENT_NODE == type || DTM.DOCUMENT_NODE == type) { return null;