ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1823580 - /webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java
Date Thu, 08 Feb 2018 16:35:08 GMT
Author: coheigea
Date: Thu Feb  8 16:35:07 2018
New Revision: 1823580

URL: http://svn.apache.org/viewvc?rev=1823580&view=rev
Log:
Fixing hashcode/equals

Modified:
    webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java

Modified: webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java?rev=1823580&r1=1823579&r2=1823580&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java
(original)
+++ webservices/wss4j/trunk/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java
Thu Feb  8 16:35:07 2018
@@ -171,7 +171,7 @@ public class SubjectBean {
     public String getSubjectNameSPProvidedID() {
         return nameID.getSPProvidedID();
     }
-    
+
     public void setSubjectNameSPProvidedID(String subjectNameSPProvidedID) {
         nameID.setSPProvidedID(subjectNameSPProvidedID);
     }
@@ -269,6 +269,13 @@ public class SubjectBean {
             return false;
         }
 
+        if (subjectConfirmationNameID == null && that.subjectConfirmationNameID !=
null) {
+            return false;
+        } else if (subjectConfirmationNameID != null
+            && !subjectConfirmationNameID.equals(that.subjectConfirmationNameID))
{
+            return false;
+        }
+
         return true;
     }
 
@@ -287,6 +294,9 @@ public class SubjectBean {
         if (subjectConfirmationData != null) {
             result = 31 * result + subjectConfirmationData.hashCode();
         }
+        if (subjectConfirmationNameID != null) {
+            result = 31 * result + subjectConfirmationNameID.hashCode();
+        }
         return result;
     }
 



Mime
View raw message