Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 2984a7f4b -> 8d4a0c8bf


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/c4cb32f6
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c4cb32f6
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c4cb32f6

Branch: refs/heads/3.1.x-fixes
Commit: c4cb32f6a7b888308fd0f026bd38ca709e3ad15b
Parents: 2984a7f4
Author: Daniel Kulp <dk...@apache.org>
Authored: Fri May 5 20:33:47 2017 -0400
Committer: Daniel Kulp <dk...@apache.org>
Committed: Fri May 12 14:32:28 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/c4cb32f6/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;

Reply via email to