SPR-7474 - AbstractXmlStreamReader getAttributeValue(String, String) does not handle null namespaceURI properly
git-svn-id: https://src.springframework.org/svn/spring-framework/trunk@3606 50f2f4bb-b051-0410-bef5-90022cba6387
This commit is contained in:
parent
49dd9b04ab
commit
2578cf21a0
|
|
@ -149,7 +149,8 @@ abstract class AbstractXMLStreamReader implements XMLStreamReader {
|
|||
public String getAttributeValue(String namespaceURI, String localName) {
|
||||
for (int i = 0; i < getAttributeCount(); 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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue