You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2018/02/08 16:51:58 UTC
svn commit: r1823584 -
/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java
Author: coheigea
Date: Thu Feb 8 16:51:58 2018
New Revision: 1823584
URL: http://svn.apache.org/viewvc?rev=1823584&view=rev
Log:
Fixing hashcode/equals
Modified:
webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java
Modified: webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java?rev=1823584&r1=1823583&r2=1823584&view=diff
==============================================================================
--- webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java (original)
+++ webservices/wss4j/branches/2_1_x-fixes/ws-security-common/src/main/java/org/apache/wss4j/common/saml/bean/SubjectBean.java Thu Feb 8 16:51:58 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;
}