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

noreply at shibboleth.net noreply at shibboleth.net
Tue Jul 5 15:17:37 EDT 2016


Author: scantor
Date: Tue Jul  5 15:17:37 2016
New Revision: 8279

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=8279&view=rev
Log:
Explicitly allow live access to member collection.

Modified:
    trunk/idp-attribute-resolver-api/src/main/java/net/shibboleth/idp/attribute/resolver/context/AttributeResolutionContext.java

Modified: trunk/idp-attribute-resolver-api/src/main/java/net/shibboleth/idp/attribute/resolver/context/AttributeResolutionContext.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-resolver-api/src/main/java/net/shibboleth/idp/attribute/resolver/context/AttributeResolutionContext.java?rev=8279&r1=8278&r2=8279&view=diff
==============================================================================
--- trunk/idp-attribute-resolver-api/src/main/java/net/shibboleth/idp/attribute/resolver/context/AttributeResolutionContext.java	(original)
+++ trunk/idp-attribute-resolver-api/src/main/java/net/shibboleth/idp/attribute/resolver/context/AttributeResolutionContext.java	Tue Jul  5 15:17:37 2016
@@ -18,7 +18,6 @@
 package net.shibboleth.idp.attribute.resolver.context;
 
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
@@ -29,6 +28,7 @@
 import javax.annotation.concurrent.NotThreadSafe;
 
 import net.shibboleth.idp.attribute.IdPAttribute;
+import net.shibboleth.utilities.java.support.annotation.constraint.Live;
 import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
 import net.shibboleth.utilities.java.support.annotation.constraint.NotLive;
 import net.shibboleth.utilities.java.support.annotation.constraint.NullableElements;
@@ -70,7 +70,7 @@
     /** Constructor. */
     public AttributeResolutionContext() {
         allowCachedResults = true;
-        requestedAttributeNames = Collections.emptySet();
+        requestedAttributeNames = new HashSet<>();
         resolvedAttributes =
                 MapConstraints.constrainedMap(new HashMap<String, IdPAttribute>(), MapConstraints.notNull());
     }
@@ -170,11 +170,11 @@
     }
 
     /**
-     * Get the (internal) names of the attributes requested to be resolved.
-     * 
-     * @return set of attributes requested to be resolved
-     */
-    @Nonnull @NonnullElements public Collection<String> getRequestedIdPAttributeNames() {
+     * Get a live collection of the (internal) names of the attributes requested to be resolved.
+     * 
+     * @return live collection of attributes requested to be resolved
+     */
+    @Nonnull @NonnullElements @Live public Collection<String> getRequestedIdPAttributeNames() {
         return requestedAttributeNames;
     }
 



More information about the commits mailing list