[java-identity-provider COMMIT] /trunk/idp-attribute-mapper-impl/src/main/java/net/shibboleth/idp/attribute/mapper/im...
noreply at shibboleth.net
noreply at shibboleth.net
Sat Sep 21 09:04:26 EDT 2013
Author: rdw
Date: Sat Sep 21 09:04:26 2013
New Revision: 4787
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4787&view=rev
Log:
IDP-264 Att hash code and equality to the mappers and value mappers
Modified:
trunk/idp-attribute-mapper-impl/src/main/java/net/shibboleth/idp/attribute/mapper/impl/XmlObjectAttributeValueMapper.java
Modified: trunk/idp-attribute-mapper-impl/src/main/java/net/shibboleth/idp/attribute/mapper/impl/XmlObjectAttributeValueMapper.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-mapper-impl/src/main/java/net/shibboleth/idp/attribute/mapper/impl/XmlObjectAttributeValueMapper.java?rev=4787&r1=4786&r2=4787&view=diff
==============================================================================
--- trunk/idp-attribute-mapper-impl/src/main/java/net/shibboleth/idp/attribute/mapper/impl/XmlObjectAttributeValueMapper.java (original)
+++ trunk/idp-attribute-mapper-impl/src/main/java/net/shibboleth/idp/attribute/mapper/impl/XmlObjectAttributeValueMapper.java Sat Sep 21 09:04:26 2013
@@ -32,6 +32,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import com.google.common.base.Objects;
+
/**
* Decoder for {@link XMLObject} into {@link XMLObjectAttributeValue}.
*/
@@ -46,7 +48,7 @@
/** Do we include the attribute value, or just its first child?
* @return Returns the includeAttributeValue.
*/
- public boolean setIncludeAttributeValue() {
+ public boolean isIncludeAttributeValue() {
return includeAttributeValue;
}
@@ -86,4 +88,25 @@
return "XMLObject";
}
+ /** {@inheritDoc} */
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+
+ if (obj == this) {
+ return true;
+ }
+
+ if (obj instanceof XmlObjectAttributeValueMapper) {
+ XmlObjectAttributeValueMapper other = (XmlObjectAttributeValueMapper) obj;
+ return isIncludeAttributeValue() == other.isIncludeAttributeValue();
+ }
+ return false;
+ }
+
+ /** {@inheritDoc} */
+ public int hashCode() {
+ return Objects.hashCode(getClass(), isIncludeAttributeValue());
+ }
}
More information about the commits
mailing list