commit | fe60d2c57000450e1ad14b7e3154c1dbe4efe838 | [log] [tgz] |
---|---|---|
author | Colm O hEigeartaigh <coheigea@apache.org> | Mon May 11 08:58:13 2020 +0000 |
committer | Colm O hEigeartaigh <coheigea@apache.org> | Mon May 11 08:58:13 2020 +0000 |
tree | 26b4ec8773b69bd34d0b2c34fef1acc571082ec7 | |
parent | f71315ffceec68400f95f79edd7f6ce3832babec [diff] |
SANTUARIO-544 - using isEqualNode to compare 2 nodes for equality. Thanks to Alanscut <wp_scut@163.com> for the patch. git-svn-id: https://svn.apache.org/repos/asf/santuario/xml-security-java/trunk@1877572 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMUtils.java b/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMUtils.java index aedaa86..137a198 100644 --- a/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMUtils.java +++ b/src/main/java/org/apache/jcp/xml/dsig/internal/dom/DOMUtils.java
@@ -357,15 +357,10 @@ } /** - * Compares 2 nodes for equality. Implementation is not complete. + * Compares 2 nodes for equality. */ public static boolean nodesEqual(Node thisNode, Node otherNode) { - if (thisNode == otherNode) { - return true; - } - - // FIXME - test content, etc - return thisNode.getNodeType() == otherNode.getNodeType(); + return thisNode.isEqualNode(otherNode); } /**