cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject cxf git commit: Add equals/hashCode to work with next version of Neethi
Date Sat, 06 May 2017 00:34:22 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 3a46e586b -> 77df31712


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

Branch: refs/heads/master
Commit: 77df31712c2f179bd9f1ed7f6d990e35b8134d7b
Parents: 3a46e58
Author: Daniel Kulp <dkulp@apache.org>
Authored: Fri May 5 20:33:47 2017 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Fri May 5 20:33:47 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/77df3171/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 f25c341..1f78ec4 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;


Mime
View raw message