[java-shib-attribute] branch main updated: IDP-1735 Filter matchAny function changes value order https://shibboleth.atlassian.net/browse/IDP-1735

Rod Widdowson rdw at steadingsoftware.com
Fri Jul 22 13:40:47 UTC 2022


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch main
in repository java-shib-attribute.

View the commit online:
http://git.shibboleth.net/view/?p=java-shib-attribute.git;a=commit;h=24f48307050f727b721a9e6424686a8d9c0234af

The following commit(s) were added to refs/heads/main by this push:
     new 24f483070 IDP-1735 Filter matchAny function changes value order https://shibboleth.atlassian.net/browse/IDP-1735
24f483070 is described below

commit 24f48307050f727b721a9e6424686a8d9c0234af
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Fri Jul 22 14:37:15 2022 +0100

    IDP-1735 Filter matchAny function changes value order
    https://shibboleth.atlassian.net/browse/IDP-1735
    
    Convert the remaininf HashSets into LinkedHashSets.
    This should only matter for the Policy
---
 .../filter/matcher/saml/impl/AttributeInMetadataMatcher.java          | 3 +--
 .../policyrule/saml/impl/AbstractEntityAttributePolicyRule.java       | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcher.java b/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcher.java
index ea12e30ea..8b9d5e47e 100644
--- a/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcher.java
+++ b/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcher.java
@@ -20,7 +20,6 @@ package net.shibboleth.idp.attribute.filter.matcher.saml.impl;
 import java.time.Instant;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashSet;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Set;
@@ -353,7 +352,7 @@ public class AttributeInMetadataMatcher extends AbstractIdentifiableInitializabl
             return Set.copyOf(attribute.getValues());
         }
 
-        final Set<IdPAttributeValue> result = new HashSet<>(attribute.getValues().size()); 
+        final Set<IdPAttributeValue> result = new LinkedHashSet<>(attribute.getValues().size());
                 
         for (final IdPAttributeValue attributeValue : attribute.getValues()) {
             if (attributeValue instanceof StringAttributeValue) {
diff --git a/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/AbstractEntityAttributePolicyRule.java b/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/AbstractEntityAttributePolicyRule.java
index dbf039e4b..5d3eb465f 100644
--- a/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/AbstractEntityAttributePolicyRule.java
+++ b/shib-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/AbstractEntityAttributePolicyRule.java
@@ -18,7 +18,7 @@
 package net.shibboleth.idp.attribute.filter.policyrule.saml.impl;
 
 import java.time.Instant;
-import java.util.HashSet;
+import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Objects;
 import java.util.Set;
@@ -178,7 +178,7 @@ public abstract class AbstractEntityAttributePolicyRule extends AbstractPolicyRu
             return Tristate.FALSE;
         }
 
-        final Set<String> attributeValues = new HashSet<>();
+        final Set<String> attributeValues = new LinkedHashSet<>();
         
         getEntityAttributeValues(entityDescriptor, entityDescriptor.getEntityID(), attributeValues);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list