cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [2/8] cxf git commit: Add equals/hashCode to work with next version of Neethi
Date Mon, 26 Jun 2017 21:08:27 GMT
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 <dkulp@apache.org>
Authored: Fri May 5 20:33:47 2017 -0400
Committer: Daniel Kulp <dkulp@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;


Mime
View raw message