[java-identity-provider COMMIT] /trunk/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/IdPAttribute.java

noreply at shibboleth.net noreply at shibboleth.net
Mon Nov 4 03:55:57 EST 2013


Author: rdw
Date: Mon Nov  4 03:55:57 2013
New Revision: 4923

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4923&view=rev
Log:
IDP-316 Fixing types in a class in java-support and as a result finish tidy up of up AdPAttribute <AttributeValue> becomes <AttributeValue<?>>

Modified:
    trunk/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/IdPAttribute.java

Modified: trunk/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/IdPAttribute.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/IdPAttribute.java?rev=4923&r1=4922&r2=4923&view=diff
==============================================================================
--- trunk/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/IdPAttribute.java (original)
+++ trunk/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/IdPAttribute.java Mon Nov  4 03:55:57 2013
@@ -169,22 +169,9 @@
      * @param newValues the new values for this attribute
      */
     public void setValues(@Nullable @NullableElements final Collection<? extends AttributeValue<?>> newValues) {
-        // TODO(rdw) - fix when java-support can be revised
-        Set<AttributeValue> oldCheckedValues =
-                Constraints.constrainedSet(new HashSet<AttributeValue>(), Constraints.notNull());
-        Set<AttributeValue> oldNewValues = new HashSet<>();
-        if (null != newValues) {
-            oldNewValues.addAll(newValues);
-        }
-        CollectionSupport.addIf(oldCheckedValues, oldNewValues, Predicates.<AttributeValue> notNull());
-
         Set<AttributeValue<?>> checkedValues =
                 Constraints.constrainedSet(new HashSet<AttributeValue<?>>(), Constraints.notNull());
-        //
-//        CollectionSupport.addIf(checkedValues, newValues, Predicates.<AttributeValue<?>> notNull());
-        for (AttributeValue oldCheckedValue : oldCheckedValues) {
-            checkedValues.add(oldCheckedValue);
-        }
+        CollectionSupport.addIf(checkedValues, newValues, Predicates.<AttributeValue> notNull());
         values = checkedValues;
     }
 



More information about the commits mailing list