[java-identity-provider] branch master updated: IDP-1121 Simplify typing for IdPAttributeValue

Rod Widdowson rdw at steadingsoftware.com
Tue Apr 23 11:05:01 EDT 2019


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

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

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

The following commit(s) were added to refs/heads/master by this push:
       new  4baa305   IDP-1121 Simplify typing for IdPAttributeValue
4baa305 is described below

commit 4baa305d3532f27f3169e4022bdf0b4ee3c9c8bd
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Tue Apr 23 15:54:10 2019 +0100

    IDP-1121 Simplify typing for IdPAttributeValue
    
    https://issues.shibboleth.net/jira/browse/IDP-1121
    
    Phase 1.  Explcitly remove the <? extends IdPAttributeValue> from method prototypes.
    
    It add no values except typing exercise and muddies the underlying typing issues.
    
    This proved by the fact that nearly all thhe requirde code changes are in tests.
---
 .../net/shibboleth/idp/attribute/IdPAttribute.java |  2 +-
 .../filter/matcher/impl/ScriptedMatcherTest.java   |  2 +-
 .../saml/impl/AttributeInMetadataMatcherTest.java  |  2 +-
 .../impl/MappedAttributeInMetadataMatcherTest.java |  2 +-
 .../impl/NumOfAttributeValuesPolicyRuleTest.java   |  3 ++-
 .../ad/impl/ScopedAttributeDefinition.java         |  2 +-
 .../ad/mapped/impl/MappedAttributeDefinition.java  |  2 +-
 .../ContextDerivedAttributeDefinitionTest.java     |  4 ++--
 .../impl/SAML2NameIDAttributeDefinitionTest.java   |  2 +-
 ...ntextDerivedAttributeDefinitionsParserTest.java |  2 +-
 .../SAML1NameIdentifierAttributeDefinition.java    |  4 ++--
 .../impl/SAML2NameIDAttributeDefinition.java       |  4 ++--
 .../impl/SAML1ByteAttributeEncoderTest.java        |  8 +++----
 .../SAML1ScopedStringAttributeEncoderTest.java     |  8 +++----
 .../impl/SAML1StringAttributeEncoderTest.java      |  6 ++---
 .../impl/SAML1XMLObjectAttributeEncoderTest.java   |  7 +++---
 .../impl/SAML2ByteAttributeEncoderTest.java        |  8 +++----
 .../SAML2ScopedStringAttributeEncoderTest.java     | 16 ++++++-------
 .../impl/SAML2StringAttributeEncoderTest.java      | 10 +++-----
 .../impl/SAML2XMLObjectAttributeEncoderTest.java   | 10 +++-----
 ...uteSourcedSAML1NameIdentifierGeneratorTest.java | 24 +++++--------------
 .../AttributeSourcedSAML2NameIDGeneratorTest.java  | 28 +++++-----------------
 22 files changed, 56 insertions(+), 100 deletions(-)

diff --git a/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/IdPAttribute.java b/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/IdPAttribute.java
index 5cdd380..97cbfe4 100644
--- a/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/IdPAttribute.java
+++ b/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/IdPAttribute.java
@@ -172,7 +172,7 @@ public class IdPAttribute implements Comparable<IdPAttribute>, Cloneable {
      * 
      * @param newValues the new values for this attribute
      */
-    public void setValues(@Nullable @NullableElements final Collection<? extends IdPAttributeValue<?>> newValues) {
+    public void setValues(@Nullable @NullableElements final Collection<IdPAttributeValue<?>> newValues) {
         if (newValues != null) {
             values = List.of(newValues.stream().
                      map(e -> e==null? new EmptyAttributeValue(EmptyType.NULL_VALUE) :e).
diff --git a/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/impl/ScriptedMatcherTest.java b/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/impl/ScriptedMatcherTest.java
index f790dbf..ce3d653 100644
--- a/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/impl/ScriptedMatcherTest.java
+++ b/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/impl/ScriptedMatcherTest.java
@@ -319,7 +319,7 @@ public class ScriptedMatcherTest extends AbstractMatcherPolicyRuleTest {
 
         final IdPAttribute newAttr = attribute.clone();
 
-        final Set<IdPAttributeValue<String>> s = new HashSet(2);
+        final Set<IdPAttributeValue<?>> s = new HashSet(2);
         s.add(new StringAttributeValue(ProfileRequestContext.class.getName()));
         s.add(new StringAttributeValue("BAR"));
         s.add(new StringAttributeValue("FOO"));
diff --git a/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcherTest.java b/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcherTest.java
index 4ef81c6..d9405d4 100644
--- a/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcherTest.java
+++ b/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcherTest.java
@@ -70,7 +70,7 @@ public class AttributeInMetadataMatcherTest extends OpenSAMLInitBaseTestCase {
         valueBuilder = XMLObjectProviderRegistrySupport.getBuilderFactory().<XSString>getBuilderOrThrow(XSString.TYPE_NAME);
     }
 
-    private IdPAttribute makeAttribute(String id, List<? extends IdPAttributeValue<?>> values) {
+    private IdPAttribute makeAttribute(String id, List<IdPAttributeValue<?>> values) {
         final IdPAttribute attr = new IdPAttribute(id);
         attr.setValues(values);
         
diff --git a/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/MappedAttributeInMetadataMatcherTest.java b/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/MappedAttributeInMetadataMatcherTest.java
index 82f1a23..9b875fa 100644
--- a/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/MappedAttributeInMetadataMatcherTest.java
+++ b/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/MappedAttributeInMetadataMatcherTest.java
@@ -60,7 +60,7 @@ public class MappedAttributeInMetadataMatcherTest extends OpenSAMLInitBaseTestCa
                         AttributeConsumingService.DEFAULT_ELEMENT_NAME);
     }
     
-    private IdPAttribute makeAttribute(String id, List<? extends IdPAttributeValue<?>> values) {
+    private IdPAttribute makeAttribute(String id, List<IdPAttributeValue<?>> values) {
         IdPAttribute attr = new IdPAttribute(id);
         attr.setValues(values);
         return attr;
diff --git a/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/filtercontext/impl/NumOfAttributeValuesPolicyRuleTest.java b/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/filtercontext/impl/NumOfAttributeValuesPolicyRuleTest.java
index b64bae0..faf731e 100644
--- a/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/filtercontext/impl/NumOfAttributeValuesPolicyRuleTest.java
+++ b/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/policyrule/filtercontext/impl/NumOfAttributeValuesPolicyRuleTest.java
@@ -26,6 +26,7 @@ import java.util.HashSet;
 import org.testng.annotations.Test;
 
 import net.shibboleth.idp.attribute.IdPAttribute;
+import net.shibboleth.idp.attribute.IdPAttributeValue;
 import net.shibboleth.idp.attribute.StringAttributeValue;
 import net.shibboleth.idp.attribute.filter.PolicyRequirementRule.Tristate;
 import net.shibboleth.idp.attribute.filter.context.AttributeFilterContext;
@@ -109,7 +110,7 @@ public class NumOfAttributeValuesPolicyRuleTest {
 
     private AttributeFilterContext manufactureWith(String name, int howMany) {
         final IdPAttribute attr = new IdPAttribute(name);
-        final HashSet<StringAttributeValue> hs = new HashSet<>(howMany);
+        final HashSet<IdPAttributeValue<?>> hs = new HashSet<>(howMany);
         
         for (int i = 0; i < howMany; i++) {
             hs.add(new StringAttributeValue(Integer.toString(i)));
diff --git a/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/ad/impl/ScopedAttributeDefinition.java b/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/ad/impl/ScopedAttributeDefinition.java
index 8715195..ba297d5 100644
--- a/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/ad/impl/ScopedAttributeDefinition.java
+++ b/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/ad/impl/ScopedAttributeDefinition.java
@@ -94,7 +94,7 @@ public class ScopedAttributeDefinition extends AbstractAttributeDefinition {
                         getDataConnectorDependencies(), 
                         getId());
 
-        final List<StringAttributeValue> valueList = new ArrayList<>(dependencyValues.size());
+        final List<IdPAttributeValue<?>> valueList = new ArrayList<>(dependencyValues.size());
 
         for (final IdPAttributeValue dependencyValue : dependencyValues) {
             if (dependencyValue instanceof EmptyAttributeValue) {
diff --git a/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/ad/mapped/impl/MappedAttributeDefinition.java b/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/ad/mapped/impl/MappedAttributeDefinition.java
index 11395f9..3904e6c 100644
--- a/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/ad/mapped/impl/MappedAttributeDefinition.java
+++ b/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/ad/mapped/impl/MappedAttributeDefinition.java
@@ -216,7 +216,7 @@ public class MappedAttributeDefinition extends AbstractAttributeDefinition {
             }
         } else {
 
-            final List<StringAttributeValue> valueList = new ArrayList<>();
+            final List<IdPAttributeValue<?>> valueList = new ArrayList<>();
             for (final IdPAttributeValue<?> unmappedValue : unmappedResults) {
                 if (unmappedValue instanceof EmptyAttributeValue) {
                     valueList.addAll(mapValue(null));                    
diff --git a/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/ad/impl/ContextDerivedAttributeDefinitionTest.java b/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/ad/impl/ContextDerivedAttributeDefinitionTest.java
index f91d2e3..f605e76 100644
--- a/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/ad/impl/ContextDerivedAttributeDefinitionTest.java
+++ b/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/ad/impl/ContextDerivedAttributeDefinitionTest.java
@@ -50,7 +50,7 @@ public class ContextDerivedAttributeDefinitionTest {
     
 
     @Test public void simpleValue() throws ComponentInitializationException, ResolutionException {
-        final List<IdPAttributeValue<String>> list = new ArrayList<>(2);
+        final List<IdPAttributeValue<?>> list = new ArrayList<>(2);
         list.add(new StringAttributeValue(SIMPLE_VALUE));
         list.add(new StringAttributeValue(SIMPLE_VALUE + "2"));
         
@@ -88,7 +88,7 @@ public class ContextDerivedAttributeDefinitionTest {
     }
     
     @Test public void empty() throws ComponentInitializationException, ResolutionException {
-        final List<IdPAttributeValue<String>> list = Collections.EMPTY_LIST;
+        final List<IdPAttributeValue<?>> list = Collections.EMPTY_LIST;
         
         final IdPAttribute attr = new IdPAttribute("wibble");
         attr.setValues(list);
diff --git a/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/ad/impl/SAML2NameIDAttributeDefinitionTest.java b/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/ad/impl/SAML2NameIDAttributeDefinitionTest.java
index a037d8a..a14df66 100644
--- a/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/ad/impl/SAML2NameIDAttributeDefinitionTest.java
+++ b/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/ad/impl/SAML2NameIDAttributeDefinitionTest.java
@@ -77,7 +77,7 @@ public class SAML2NameIDAttributeDefinitionTest extends OpenSAMLInitBaseTestCase
         defn.initialize();
 
         final IdPAttribute attr = new IdPAttribute("bar");
-        final List<? extends IdPAttributeValue<?>> values = Collections.emptyList();
+        final List<IdPAttributeValue<?>> values = Collections.emptyList();
         attr.setValues(values);
 
         final StaticAttributeDefinition sa = new StaticAttributeDefinition();
diff --git a/idp-attribute-resolver-spring/src/test/java/net/shibboleth/idp/attribute/resolver/spring/ad/ContextDerivedAttributeDefinitionsParserTest.java b/idp-attribute-resolver-spring/src/test/java/net/shibboleth/idp/attribute/resolver/spring/ad/ContextDerivedAttributeDefinitionsParserTest.java
index 23dfb5c..55ae69b 100644
--- a/idp-attribute-resolver-spring/src/test/java/net/shibboleth/idp/attribute/resolver/spring/ad/ContextDerivedAttributeDefinitionsParserTest.java
+++ b/idp-attribute-resolver-spring/src/test/java/net/shibboleth/idp/attribute/resolver/spring/ad/ContextDerivedAttributeDefinitionsParserTest.java
@@ -53,7 +53,7 @@ public class ContextDerivedAttributeDefinitionsParserTest extends BaseAttributeD
     private static final String SIMPLE_VALUE = "simple";
 
     private AttributeResolutionContext getCtx(final String attributeName) {
-        final List<IdPAttributeValue<String>> list = new ArrayList<>(2);
+        final List<IdPAttributeValue<?>> list = new ArrayList<>(2);
         list.add(new StringAttributeValue(SIMPLE_VALUE));
         list.add(new StringAttributeValue(SIMPLE_VALUE + "2"));
 
diff --git a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/attribute/resolver/impl/SAML1NameIdentifierAttributeDefinition.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/attribute/resolver/impl/SAML1NameIdentifierAttributeDefinition.java
index 6e929a4..70979bd 100644
--- a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/attribute/resolver/impl/SAML1NameIdentifierAttributeDefinition.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/attribute/resolver/impl/SAML1NameIdentifierAttributeDefinition.java
@@ -185,7 +185,7 @@ public class SAML1NameIdentifierAttributeDefinition extends AbstractAttributeDef
         ComponentSupport.ifNotInitializedThrowUninitializedComponentException(this);
         ComponentSupport.ifDestroyedThrowDestroyedComponentException(this);
         final List<? extends IdPAttributeValue<?>> inputValues;
-        List<? extends IdPAttributeValue<?>> outputValues = null;
+        List<IdPAttributeValue<?>> outputValues = null;
         final IdPAttribute result = new IdPAttribute(getId());
 
         inputValues = PluginDependencySupport.getMergedAttributeValues(workContext,
@@ -202,7 +202,7 @@ public class SAML1NameIdentifierAttributeDefinition extends AbstractAttributeDef
             } else {
                 // TODO(rdw) Fix typing
                 // Intermediate to solve typing issues.
-                final List<XMLObjectAttributeValue> xmlVals = new ArrayList<>(inputValues.size());
+                final List<IdPAttributeValue<?>> xmlVals = new ArrayList<>(inputValues.size());
                 for (final IdPAttributeValue<?> theValue : inputValues) {
                     final XMLObjectAttributeValue val = encodeOneValue(theValue, resolutionContext);
                     if (null != val) {
diff --git a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/attribute/resolver/impl/SAML2NameIDAttributeDefinition.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/attribute/resolver/impl/SAML2NameIDAttributeDefinition.java
index 21d0094..5183530 100644
--- a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/attribute/resolver/impl/SAML2NameIDAttributeDefinition.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/attribute/resolver/impl/SAML2NameIDAttributeDefinition.java
@@ -221,7 +221,7 @@ public class SAML2NameIDAttributeDefinition extends AbstractAttributeDefinition
         ComponentSupport.ifNotInitializedThrowUninitializedComponentException(this);
         ComponentSupport.ifDestroyedThrowDestroyedComponentException(this);
         final List<IdPAttributeValue<?>> inputValues;
-        List<? extends IdPAttributeValue<?>> outputValues = null;
+        List<IdPAttributeValue<?>> outputValues = null;
         final IdPAttribute result = new IdPAttribute(getId());
 
         inputValues = PluginDependencySupport.getMergedAttributeValues(workContext,
@@ -238,7 +238,7 @@ public class SAML2NameIDAttributeDefinition extends AbstractAttributeDefinition
                 }
             } else {
                 // TODO Intermediate to solve typing issues.
-                final List<XMLObjectAttributeValue> xmlVals = new ArrayList<>(inputValues.size());
+                final List<IdPAttributeValue<?>> xmlVals = new ArrayList<>(inputValues.size());
                 for (final IdPAttributeValue<?> theValue : inputValues) {
                     final XMLObjectAttributeValue val = encodeOneValue(theValue, resolutionContext);
                     if (null != val) {
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ByteAttributeEncoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ByteAttributeEncoderTest.java
index 4dd6c42..ecaa61b 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ByteAttributeEncoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ByteAttributeEncoderTest.java
@@ -93,8 +93,7 @@ public class SAML1ByteAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
     }
 
     @Test public void single() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(new StringAttributeValue("foo"), new ByteAttributeValue(BYTE_ARRAY_1));
+        final List<IdPAttributeValue<?>> values = List.of(new StringAttributeValue("foo"), new ByteAttributeValue(BYTE_ARRAY_1));
         final IdPAttribute inputAttribute;
 
         inputAttribute = new IdPAttribute(ATTR_NAME);
@@ -121,9 +120,8 @@ public class SAML1ByteAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
     }
 
     @Test public void multi() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(new ByteAttributeValue(BYTE_ARRAY_1), new ByteAttributeValue(
-                        BYTE_ARRAY_2));
+        final List<IdPAttributeValue<?>> values = List.of(new ByteAttributeValue(BYTE_ARRAY_1), 
+                new ByteAttributeValue(BYTE_ARRAY_2));
 
         final IdPAttribute inputAttribute;
         inputAttribute = new IdPAttribute(ATTR_NAME);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ScopedStringAttributeEncoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ScopedStringAttributeEncoderTest.java
index 210c77d..c1d725e 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ScopedStringAttributeEncoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1ScopedStringAttributeEncoderTest.java
@@ -128,7 +128,7 @@ public class SAML1ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
         encoder.setScopeAttributeName(ATTRIBUTE_NAME);
         encoder.setScopeDelimiter(DELIMITER);
 
-        final List<? extends IdPAttributeValue<?>> values =
+        final List<IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), value1);
 
         final IdPAttribute inputAttribute;
@@ -161,7 +161,7 @@ public class SAML1ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
     @Test public void multi() throws ComponentInitializationException, AttributeEncodingException {
         final SAML1ScopedStringAttributeEncoder encoder = makeEncoder();
         encoder.initialize();
-        final List<? extends IdPAttributeValue<?>> values =
+        final List<IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), value1, value2);
 
         final IdPAttribute inputAttribute;
@@ -217,7 +217,7 @@ public class SAML1ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
         encoder.setScopeDelimiter(DELIMITER);
         encoder.initialize();
 
-        final List<? extends IdPAttributeValue<?>> values =
+        final List<IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), value1);
 
         final IdPAttribute inputAttribute;
@@ -250,7 +250,7 @@ public class SAML1ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
         encoder.setScopeDelimiter(DELIMITER);
         encoder.setScopeAttributeName(null);
         encoder.initialize();
-        final List<? extends IdPAttributeValue<?>> values =
+        final List<IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), value1, value2);
 
         final IdPAttribute inputAttribute;
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1StringAttributeEncoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1StringAttributeEncoderTest.java
index b30c595..9e6b68c 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1StringAttributeEncoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1StringAttributeEncoderTest.java
@@ -91,8 +91,7 @@ public class SAML1StringAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
     }
 
     @Test public void single() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new StringAttributeValue(STRING_1));
+        final List<IdPAttributeValue<?>> values = List.of(new ByteAttributeValue(new byte[] {1, 2, 3,}), new StringAttributeValue(STRING_1));
 
         final IdPAttribute inputAttribute;
         inputAttribute = new IdPAttribute(ATTR_NAME);
@@ -119,8 +118,7 @@ public class SAML1StringAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
     }
 
     @Test public void multi() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
+        final List<IdPAttributeValue<?>> values = List.of(new ByteAttributeValue(new byte[] {1, 2, 3,}),
                         new StringAttributeValue(STRING_1),
                         new StringAttributeValue(STRING_2),
                         new ScopedStringAttributeValue(STRING_2, STRING_1));
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1XMLObjectAttributeEncoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1XMLObjectAttributeEncoderTest.java
index 2fc8e5f..c27c41a 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1XMLObjectAttributeEncoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML1XMLObjectAttributeEncoderTest.java
@@ -120,7 +120,7 @@ public class SAML1XMLObjectAttributeEncoderTest extends OpenSAMLInitBaseTestCase
 
     @Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
         final int[] intArray = {1, 2, 3, 4};
-        final List<? extends IdPAttributeValue<?>> values =
+        final List<IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
                         new ScopedStringAttributeValue("foo", "bar"), new IdPAttributeValue<Object>() {
                             @Override
@@ -139,8 +139,7 @@ public class SAML1XMLObjectAttributeEncoderTest extends OpenSAMLInitBaseTestCase
     }
 
     @Test public void single() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), ObjectFor(STRING_1));
+        final List<IdPAttributeValue<?>> values = List.of(new ByteAttributeValue(new byte[] {1, 2, 3,}), ObjectFor(STRING_1));
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
         inputAttribute.setValues(values);
@@ -160,7 +159,7 @@ public class SAML1XMLObjectAttributeEncoderTest extends OpenSAMLInitBaseTestCase
     }
 
     @Test public void testMulti() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values = Arrays.asList(ObjectFor(STRING_1), ObjectFor(STRING_2));
+        final List<IdPAttributeValue<?>> values = List.of(ObjectFor(STRING_1), ObjectFor(STRING_2));
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
         inputAttribute.setValues(values);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2ByteAttributeEncoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2ByteAttributeEncoderTest.java
index b871856..35dd30b 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2ByteAttributeEncoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2ByteAttributeEncoderTest.java
@@ -73,7 +73,7 @@ public class SAML2ByteAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
 
     @Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
         final int[] intArray = {1, 2, 3, 4};
-        final List<? extends IdPAttributeValue<?>> values =
+        final List<IdPAttributeValue<?>> values =
                 Arrays.asList(new StringAttributeValue("foo"), new ScopedStringAttributeValue("foo", "bar"),
                         new IdPAttributeValue<Object>() {
                             public Object getValue() {
@@ -90,8 +90,7 @@ public class SAML2ByteAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
     }
 
     @Test public void single() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(new StringAttributeValue("foo"), new ByteAttributeValue(BYTE_ARRAY_1));
+        final List<IdPAttributeValue<?>> values = List.of(new StringAttributeValue("foo"), new ByteAttributeValue(BYTE_ARRAY_1));
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
         inputAttribute.setValues(values);
 
@@ -116,8 +115,7 @@ public class SAML2ByteAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
     }
 
     @Test public void multi() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(new ByteAttributeValue(BYTE_ARRAY_1), new ByteAttributeValue(BYTE_ARRAY_2));
+        final List<IdPAttributeValue<?>> values = List.of(new ByteAttributeValue(BYTE_ARRAY_1), new ByteAttributeValue(BYTE_ARRAY_2));
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
         inputAttribute.setValues(values);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2ScopedStringAttributeEncoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2ScopedStringAttributeEncoderTest.java
index 3671188..d3d6ce9 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2ScopedStringAttributeEncoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2ScopedStringAttributeEncoderTest.java
@@ -18,6 +18,7 @@
 package net.shibboleth.idp.saml.attribute.encoding.impl;
 
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.List;
 
 import org.opensaml.core.OpenSAMLInitBaseTestCase;
@@ -91,8 +92,8 @@ public class SAML2ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
             throws AttributeEncodingException, ComponentInitializationException {
         final SAML2ScopedStringAttributeEncoder encoder = makeEncoder();
         final int[] intArray = {1, 2, 3, 4};
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new StringAttributeValue("dd"),
+        final var values =
+                List.of(new ByteAttributeValue(new byte[] {1, 2, 3,}), new StringAttributeValue("dd"),
                         new IdPAttributeValue<Object>() {
                             public Object getValue() {
                                 return intArray;
@@ -128,7 +129,7 @@ public class SAML2ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
         encoder.setScopeAttributeName(ATTRIBUTE_NAME);
         encoder.setScopeDelimiter(DELIMITER);
 
-        final List<? extends IdPAttributeValue<?>> values =
+        final Collection<IdPAttributeValue<?>> values =
                 Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), value1);
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
@@ -162,8 +163,7 @@ public class SAML2ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
         encoder.setScopeType("attribute");
         encoder.setScopeAttributeName(ATTR_NAME);
         encoder.initialize();
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), value1, value2);
+        Collection<IdPAttributeValue<?>> values = List.of(value1, new ByteAttributeValue(new byte[] {1, 2, 3,}),  value2);
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
         inputAttribute.setValues(values);
@@ -224,8 +224,7 @@ public class SAML2ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
         encoder.setScopeDelimiter(DELIMITER);
         encoder.initialize();
 
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), value1);
+        final List<IdPAttributeValue<?>> values = List.of(new ByteAttributeValue(new byte[] {1, 2, 3,}), value1);
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
         inputAttribute.setValues(values);
@@ -255,8 +254,7 @@ public class SAML2ScopedStringAttributeEncoderTest extends OpenSAMLInitBaseTestC
         encoder.setScopeDelimiter(DELIMITER);
         encoder.setScopeAttributeName(null);
         encoder.initialize();
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), value1, value2);
+        final List<IdPAttributeValue<?>> values = List.of(new ByteAttributeValue(new byte[] {1, 2, 3,}), value1, value2);
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
         inputAttribute.setValues(values);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2StringAttributeEncoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2StringAttributeEncoderTest.java
index da888ce..80ce8b6 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2StringAttributeEncoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2StringAttributeEncoderTest.java
@@ -17,7 +17,6 @@
 
 package net.shibboleth.idp.saml.attribute.encoding.impl;
 
-import java.util.Arrays;
 import java.util.List;
 
 import org.opensaml.core.OpenSAMLInitBaseTestCase;
@@ -72,8 +71,7 @@ public class SAML2StringAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
 
     @Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
         final int[] intArray = {1, 2, 3, 4};
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new IdPAttributeValue<Object>() {
+        final var values = List.of(new ByteAttributeValue(new byte[] {1, 2, 3,}), new IdPAttributeValue<Object>() {
                     @Override
                     public Object getValue() {
                         return intArray;
@@ -91,8 +89,7 @@ public class SAML2StringAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
     }
 
     @Test public void single() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new StringAttributeValue(STRING_1));
+        final List<IdPAttributeValue<?>> values = List.of(new ByteAttributeValue(new byte[] {1, 2, 3,}), new StringAttributeValue(STRING_1));
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
         inputAttribute.setValues(values);
@@ -118,8 +115,7 @@ public class SAML2StringAttributeEncoderTest extends OpenSAMLInitBaseTestCase {
     }
 
     @Test public void multi() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
+        final List<IdPAttributeValue<?>> values = List.of(new ByteAttributeValue(new byte[] {1, 2, 3,}),
                         new StringAttributeValue(STRING_1),
                         new StringAttributeValue(STRING_2),
                         new ScopedStringAttributeValue(STRING_1, STRING_2));
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2XMLObjectAttributeEncoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2XMLObjectAttributeEncoderTest.java
index 87322fc..b6675a0 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2XMLObjectAttributeEncoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/encoding/impl/SAML2XMLObjectAttributeEncoderTest.java
@@ -17,7 +17,6 @@
 
 package net.shibboleth.idp.saml.attribute.encoding.impl;
 
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
@@ -121,8 +120,7 @@ public class SAML2XMLObjectAttributeEncoderTest extends OpenSAMLInitBaseTestCase
 
     @Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
         final int[] intArray = {1, 2, 3, 4};
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new ScopedStringAttributeValue("foo",
+        final var values = List.of(new ByteAttributeValue(new byte[] {1, 2, 3,}), new ScopedStringAttributeValue("foo",
                         "bar"), new IdPAttributeValue<Object>() {
                     @Override
                     public Object getValue() {
@@ -140,8 +138,7 @@ public class SAML2XMLObjectAttributeEncoderTest extends OpenSAMLInitBaseTestCase
     }
 
     @Test public void single() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), ObjectFor(STRING_1));
+        final var values = List.of(new ByteAttributeValue(new byte[] {1, 2, 3,}), ObjectFor(STRING_1));
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
         inputAttribute.setValues(values);
@@ -161,8 +158,7 @@ public class SAML2XMLObjectAttributeEncoderTest extends OpenSAMLInitBaseTestCase
     }
 
     @Test public void multi() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(ObjectFor(STRING_1), ObjectFor(STRING_2));
+        final List<IdPAttributeValue<?>> values = List.of(ObjectFor(STRING_1), ObjectFor(STRING_2));
 
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
         inputAttribute.setValues(values);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/AttributeSourcedSAML1NameIdentifierGeneratorTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/AttributeSourcedSAML1NameIdentifierGeneratorTest.java
index 67b2741..26fc2f1 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/AttributeSourcedSAML1NameIdentifierGeneratorTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/AttributeSourcedSAML1NameIdentifierGeneratorTest.java
@@ -17,7 +17,6 @@
 
 package net.shibboleth.idp.saml.nameid.impl;
 
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
@@ -110,7 +109,7 @@ public class AttributeSourcedSAML1NameIdentifierGeneratorTest extends OpenSAMLIn
 
     @Test public void testWrongType() throws Exception {
         final int[] intArray = {1, 2, 3, 4};
-        final List<? extends IdPAttributeValue<?>> values = Arrays.asList(new IdPAttributeValue<Object>() {
+        final List<IdPAttributeValue<?>> values = List.of(new IdPAttributeValue<Object>() {
             public Object getValue() {
                 return intArray;
             }
@@ -131,9 +130,8 @@ public class AttributeSourcedSAML1NameIdentifierGeneratorTest extends OpenSAMLIn
     }
 
     @Test public void testWrongFormat() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values = Collections.singletonList(saml1NameIdFor(NAME_1));
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
-        inputAttribute.setValues(values);
+        inputAttribute.setValues(List.of(saml1NameIdFor(NAME_1)));
         prc.getSubcontext(RelyingPartyContext.class).getSubcontext(AttributeContext.class, true).setIdPAttributes(
                 Collections.singleton(inputAttribute));
 
@@ -144,9 +142,8 @@ public class AttributeSourcedSAML1NameIdentifierGeneratorTest extends OpenSAMLIn
     }
 
     @Test public void testNameIdentifierValued() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values = Collections.singletonList(saml1NameIdFor(NAME_1));
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
-        inputAttribute.setValues(values);
+        inputAttribute.setValues(List.of(saml1NameIdFor(NAME_1)));
         prc.getSubcontext(RelyingPartyContext.class).getSubcontext(AttributeContext.class, true).setIdPAttributes(
                 Collections.singleton(inputAttribute));
 
@@ -161,11 +158,8 @@ public class AttributeSourcedSAML1NameIdentifierGeneratorTest extends OpenSAMLIn
     }
 
     @Test public void testMultiNameIdentifierValued() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(saml2NameIdFor(OTHERID), saml1NameIdFor(NAME_1));
-
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
-        inputAttribute.setValues(values);
+        inputAttribute.setValues(List.of(saml2NameIdFor(OTHERID), saml1NameIdFor(NAME_1)));
         prc.getSubcontext(RelyingPartyContext.class).getSubcontext(AttributeContext.class, true).setIdPAttributes(
                 Collections.singleton(inputAttribute));
 
@@ -180,11 +174,8 @@ public class AttributeSourcedSAML1NameIdentifierGeneratorTest extends OpenSAMLIn
     }
 
     @Test public void testStringValued() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Collections.singletonList(new StringAttributeValue(NAME_1));
-
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
-        inputAttribute.setValues(values);
+        inputAttribute.setValues(List.of(new StringAttributeValue(NAME_1)));
         prc.getSubcontext(RelyingPartyContext.class).getSubcontext(AttributeContext.class, true).setIdPAttributes(
                 Collections.singleton(inputAttribute));
 
@@ -200,11 +191,8 @@ public class AttributeSourcedSAML1NameIdentifierGeneratorTest extends OpenSAMLIn
     }
 
     @Test public void testScopeValued() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Collections.singletonList(new ScopedStringAttributeValue(NAME_1, QUALIFIER));
-
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
-        inputAttribute.setValues(values);
+        inputAttribute.setValues(List.of(new ScopedStringAttributeValue(NAME_1, QUALIFIER)));
         prc.getSubcontext(RelyingPartyContext.class).getSubcontext(AttributeContext.class, true).setIdPAttributes(
                 Collections.singleton(inputAttribute));
 
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/AttributeSourcedSAML2NameIDGeneratorTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/AttributeSourcedSAML2NameIDGeneratorTest.java
index 232f967..efca1ee 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/AttributeSourcedSAML2NameIDGeneratorTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/nameid/impl/AttributeSourcedSAML2NameIDGeneratorTest.java
@@ -17,7 +17,6 @@
 
 package net.shibboleth.idp.saml.nameid.impl;
 
-import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
@@ -109,9 +108,7 @@ public class AttributeSourcedSAML2NameIDGeneratorTest extends OpenSAMLInitBaseTe
 
     @Test public void testWrongType() throws Exception {
         final int[] intArray = {1, 2, 3, 4};
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(
-                        new IdPAttributeValue<Object>() {
+        final var values = List.of(new IdPAttributeValue<Object>() {
                             public Object getValue() {
                                 return intArray;
                             }
@@ -132,10 +129,8 @@ public class AttributeSourcedSAML2NameIDGeneratorTest extends OpenSAMLInitBaseTe
     }
 
     @Test public void testWrongFormat() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Collections.singletonList(saml2NameIdFor(NAME_1));
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
-        inputAttribute.setValues(values);
+        inputAttribute.setValues(List.of(saml2NameIdFor(NAME_1)));
         prc.getSubcontext(RelyingPartyContext.class).getSubcontext(AttributeContext.class, true).setIdPAttributes(
                 Collections.singleton(inputAttribute));
 
@@ -146,10 +141,8 @@ public class AttributeSourcedSAML2NameIDGeneratorTest extends OpenSAMLInitBaseTe
     }
     
     @Test public void testNameIDValued() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Collections.singletonList(saml2NameIdFor(NAME_1));
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
-        inputAttribute.setValues(values);
+        inputAttribute.setValues(List.of(saml2NameIdFor(NAME_1)));
         prc.getSubcontext(RelyingPartyContext.class).getSubcontext(AttributeContext.class, true).setIdPAttributes(
                 Collections.singleton(inputAttribute));
 
@@ -164,11 +157,8 @@ public class AttributeSourcedSAML2NameIDGeneratorTest extends OpenSAMLInitBaseTe
     }
 
     @Test public void testMultiNameIDValued() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Arrays.asList(saml2NameIdFor(OTHERID), saml1NameIdFor(NAME_1));
-
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
-        inputAttribute.setValues(values);
+        inputAttribute.setValues(List.of(saml2NameIdFor(OTHERID), saml1NameIdFor(NAME_1)));
         prc.getSubcontext(RelyingPartyContext.class).getSubcontext(AttributeContext.class, true).setIdPAttributes(
                 Collections.singleton(inputAttribute));
 
@@ -183,11 +173,8 @@ public class AttributeSourcedSAML2NameIDGeneratorTest extends OpenSAMLInitBaseTe
     }
     
     @Test public void testStringValued() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Collections.singletonList(new StringAttributeValue(NAME_1));
-
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
-        inputAttribute.setValues(values);
+        inputAttribute.setValues(List.of(new StringAttributeValue(NAME_1)));
         prc.getSubcontext(RelyingPartyContext.class).getSubcontext(AttributeContext.class, true).setIdPAttributes(
                 Collections.singleton(inputAttribute));
 
@@ -203,11 +190,8 @@ public class AttributeSourcedSAML2NameIDGeneratorTest extends OpenSAMLInitBaseTe
     }
 
     @Test public void testScopeValued() throws Exception {
-        final List<? extends IdPAttributeValue<?>> values =
-                Collections.singletonList(new ScopedStringAttributeValue(NAME_1, QUALIFIER));
-
         final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
-        inputAttribute.setValues(values);
+        inputAttribute.setValues(List.of(new ScopedStringAttributeValue(NAME_1, QUALIFIER)));
         prc.getSubcontext(RelyingPartyContext.class).getSubcontext(AttributeContext.class, true).setIdPAttributes(
                 Collections.singleton(inputAttribute));
 

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


More information about the commits mailing list