Imported GNU Classpath 0.20
Imported GNU Classpath 0.20
* Makefile.am (AM_CPPFLAGS): Add classpath/include.
* java/nio/charset/spi/CharsetProvider.java: New override file.
* java/security/Security.java: Likewise.
* sources.am: Regenerated.
* Makefile.in: Likewise.
From-SVN: r109831
This commit is contained in:
@@ -519,5 +519,38 @@ public class DomElement
|
||||
Attr attr = (Attr) attrs.getNamedItemNS(namespaceURI, localName);
|
||||
setIdAttributeNode(attr, isId);
|
||||
}
|
||||
|
||||
public boolean isEqualNode(Node arg)
|
||||
{
|
||||
if (!super.isEqualNode(arg))
|
||||
return false;
|
||||
getAttributes();
|
||||
NamedNodeMap argAttrs = arg.getAttributes();
|
||||
int len = argAttrs.getLength();
|
||||
if (argAttrs == null || (len != attributes.length))
|
||||
return false;
|
||||
for (int i = 0; i < len; i++)
|
||||
{
|
||||
Node argCtx = argAttrs.item(i);
|
||||
// Don't compare namespace nodes
|
||||
if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI
|
||||
.equals(argCtx.getNamespaceURI()))
|
||||
continue;
|
||||
// Find corresponding attribute node
|
||||
DomNode ctx = attributes.first;
|
||||
for (; ctx != null; ctx = ctx.next)
|
||||
{
|
||||
if (XMLConstants.XMLNS_ATTRIBUTE_NS_URI
|
||||
.equals(ctx.getNamespaceURI()))
|
||||
continue;
|
||||
if (!ctx.isEqualNode(argCtx))
|
||||
continue;
|
||||
break;
|
||||
}
|
||||
if (ctx == null)
|
||||
return false; // not found
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user