提交 061b2c91 编写于 作者: A Arjen Poutsma

SPR-7474 - AbstractXmlStreamReader getAttributeValue(String, String) does not...

SPR-7474 - AbstractXmlStreamReader getAttributeValue(String, String) does not handle null namespaceURI properly
上级 9ab2c662
...@@ -149,7 +149,8 @@ abstract class AbstractXMLStreamReader implements XMLStreamReader { ...@@ -149,7 +149,8 @@ abstract class AbstractXMLStreamReader implements XMLStreamReader {
public String getAttributeValue(String namespaceURI, String localName) { public String getAttributeValue(String namespaceURI, String localName) {
for (int i = 0; i < getAttributeCount(); i++) { for (int i = 0; i < getAttributeCount(); i++) {
QName name = getAttributeName(i); QName name = getAttributeName(i);
if (name.getNamespaceURI().equals(namespaceURI) && name.getLocalPart().equals(localName)) { if (name.getLocalPart().equals(localName) &&
(namespaceURI == null || name.getNamespaceURI().equals(namespaceURI))) {
return getAttributeValue(i); return getAttributeValue(i);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册