[java-identity-provider] branch maint-4 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:56 UTC 2022


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

rdw pushed a commit to branch maint-4
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=9e82fed9ba9c8b1d9323439c12ec5ff4961bff2e

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

commit 9e82fed9ba9c8b1d9323439c12ec5ff4961bff2e
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/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcher.java b/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcher.java
index 536c0e71a..8fb580461 100644
--- a/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcher.java
+++ b/idp-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;
@@ -354,7 +353,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/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/AbstractEntityAttributePolicyRule.java b/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/AbstractEntityAttributePolicyRule.java
index 3fb70f734..a47bf9959 100644
--- a/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/AbstractEntityAttributePolicyRule.java
+++ b/idp-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;
@@ -179,7 +179,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