You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2017/06/26 21:08:27 UTC

[2/8] cxf git commit: Add equals/hashCode to work with next version of Neethi

Add equals/hashCode to work with next version of Neethi


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d037865a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d037865a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d037865a

Branch: refs/heads/3.0.x-fixes
Commit: d037865aca8256f114430c84bdc7d8511f835beb
Parents: 9eac246
Author: Daniel Kulp <dk...@apache.org>
Authored: Fri May 5 20:33:47 2017 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Mon Jun 26 15:35:39 2017 -0400

----------------------------------------------------------------------
 .../cxf/ws/policy/builder/jaxb/JaxbAssertion.java  | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/d037865a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertion.java
----------------------------------------------------------------------
diff --git a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertion.java b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertion.java
index d334636..f8108fd 100644
--- a/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertion.java
+++ b/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertion.java
@@ -64,6 +64,23 @@ public class JaxbAssertion<T> extends PrimitiveAssertion {
         JaxbAssertion<T> a = (JaxbAssertion<T>)policyComponent;
         return data.equals(a.getData());
     }
+    
+    @Override
+    public boolean equals(Object o) {
+        if (o instanceof JaxbAssertion) {
+            return super.equals(o) && equal((PolicyComponent)o);
+        }
+        return false;
+    }
+    
+    @Override
+    public int hashCode() {
+        int i = super.hashCode();
+        if (data != null) {
+            i ^= data.hashCode();
+        }
+        return i;
+    }
 
     public void setData(T d) {
         data = d;