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);
     }
 
     /**