[java-shib-attribute] branch main updated: Remove use of Deprecated AttributeContext setters from tests

Codeberg noreply at shibboleth.net
Mon Oct 19 15:50:25 UTC 2026


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

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

View the commit online:
https://codeberg.org/Shibboleth/java-shib-attribute/commit/f9184fcef581409f606f49187fbb4420dbe0ce7c

The following commit(s) were added to refs/heads/main by this push:
     new f9184fcef Remove use of Deprecated AttributeContext setters from tests
f9184fcef is described below

commit f9184fcef581409f606f49187fbb4420dbe0ce7c
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Oct 19 16:50:46 2026 +0100

    Remove use of Deprecated AttributeContext setters from tests
---
 .../net/shibboleth/idp/attribute/AttributeContextTest.java     | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/shib-attribute-api/src/test/java/net/shibboleth/idp/attribute/AttributeContextTest.java b/shib-attribute-api/src/test/java/net/shibboleth/idp/attribute/AttributeContextTest.java
index 38be05f26..6adab92d6 100644
--- a/shib-attribute-api/src/test/java/net/shibboleth/idp/attribute/AttributeContextTest.java
+++ b/shib-attribute-api/src/test/java/net/shibboleth/idp/attribute/AttributeContextTest.java
@@ -52,10 +52,10 @@ public class AttributeContextTest {
     @Test public void attributeContext() {
         AttributeContext context = new AttributeContext();
         
-        context.setIdPAttributes(Arrays.asList(new IdPAttribute("foo"), new IdPAttribute("bar")));
+        context.setIdPAttributes(Map.of("foo", new IdPAttribute("foo"), "bar", new IdPAttribute("bar")));
         contextAttributes(context, 2);
         
-        context.setIdPAttributes(CollectionSupport.emptySet());
+        context.setIdPAttributes(CollectionSupport.emptyMap());
         contextAttributes(context, 0);
     }
 
@@ -93,7 +93,7 @@ public class AttributeContextTest {
         assertEquals(attrs.get("attribute2").getValues().size(), 4);
         assertEquals(attrs.get("attribute3").getValues().size(), 3);
 
-        context.setIdPAttributes((List<IdPAttribute>)null);
+        context.setIdPAttributes((Map<String,IdPAttribute>)null);
         attrs = context.getIdPAttributes();
         assertEquals(attrs.size(), 0);
     }
@@ -101,7 +101,7 @@ public class AttributeContextTest {
     @Test public void testAttributeNoMerge() {
 
         final AttributeContext context = new AttributeContext();
-        context.setIdPAttributes(getMergeList());
+        context.setIdPAttributes(IdPAttributeSupport.toMapMergeDuplicates(getMergeList()));
 
         Map<String, IdPAttribute> attrs = context.getIdPAttributes();
 
@@ -126,7 +126,7 @@ public class AttributeContextTest {
 
     @Test public void testUnfilteredNoMerge() {
         final AttributeContext context = new AttributeContext();
-        context.setUnfilteredIdPAttributes(getMergeList());
+        context.setUnfilteredIdPAttributes(IdPAttributeSupport.toMapMergeDuplicates(getMergeList()));
 
         Map<String, IdPAttribute> attrs = context.getUnfilteredIdPAttributes();
         assertEquals(attrs.size(), 3);

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


More information about the commits mailing list