[java-shib-common COMMIT] in /branches/REL_1: doc/RELEASE-NOTES.txt src/main/java/edu/internet2/middleware/shibboleth...
noreply at shibboleth.net
noreply at shibboleth.net
Sat Oct 8 18:04:19 BST 2011
Author: lajoie
Date: Sat Oct 8 18:04:19 2011
New Revision: 1006
URL: http://svn.shibboleth.net/view/java-shib-common?rev=1006&view=rev
Log:
Restore dedupe semantics when filtering values - SC-162
Modified:
branches/REL_1/doc/RELEASE-NOTES.txt
branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/filtering/provider/ShibbolethFilteringContext.java
Modified: branches/REL_1/doc/RELEASE-NOTES.txt
URL: http://svn.shibboleth.net/view/java-shib-common/branches/REL_1/doc/RELEASE-NOTES.txt?rev=1006&r1=1005&r2=1006&view=diff
==============================================================================
--- branches/REL_1/doc/RELEASE-NOTES.txt (original)
+++ branches/REL_1/doc/RELEASE-NOTES.txt Sat Oct 8 18:04:19 2011
@@ -1,5 +1,6 @@
Changes in Release 1.3.4
=============================================
+[SC-162] - Attribute value added multiple times to retained value set if multiple policies permit the same values
[SC-163] - NPE when using filtering based on EntityAttributes in metadata
Changes in Release 1.3.3
Modified: branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/filtering/provider/ShibbolethFilteringContext.java
URL: http://svn.shibboleth.net/view/java-shib-common/branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/filtering/provider/ShibbolethFilteringContext.java?rev=1006&r1=1005&r2=1006&view=diff
==============================================================================
--- branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/filtering/provider/ShibbolethFilteringContext.java (original)
+++ branches/REL_1/src/main/java/edu/internet2/middleware/shibboleth/common/attribute/filtering/provider/ShibbolethFilteringContext.java Sat Oct 8 18:04:19 2011
@@ -23,6 +23,7 @@
import java.util.Map;
import org.opensaml.xml.util.LazyList;
+import org.opensaml.xml.util.LazySet;
import edu.internet2.middleware.shibboleth.common.attribute.BaseAttribute;
import edu.internet2.middleware.shibboleth.common.profile.provider.SAMLProfileRequestContext;
@@ -87,13 +88,17 @@
public Collection getRetainedValues(String attributeId, boolean prepopulate) {
Collection attributeValues;
if (!retainedValues.containsKey(attributeId)) {
- attributeValues = new LazyList();
+ attributeValues = new LazySet();
retainedValues.put(attributeId, attributeValues);
if (prepopulate) {
BaseAttribute attribute = unfilteredAttributes.get(attributeId);
- if (attribute != null) {
- attributeValues.addAll(attribute.getValues());
+ if (attribute != null && attribute.getValues() != null) {
+ for(Object value : attribute.getValues()){
+ if(value != null){
+ attributeValues.add(value);
+ }
+ }
}
}
} else {
More information about the commits
mailing list