[java-identity-provider] 01/02: IDP-1121 Use Lists rather than Collections or AttributeValues
Rod Widdowson
rdw at steadingsoftware.com
Sat May 18 06:18:02 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=1ec42929998ac8d87a25a0c8ca775c33eb8e2fec
commit 1ec42929998ac8d87a25a0c8ca775c33eb8e2fec
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Sat May 18 10:58:11 2019 +0100
IDP-1121 Use Lists rather than Collections or AttributeValues
https://issues.shibboleth.net/jira/browse/IDP-1121
The exception to this rule is filtering where it is more natural
to use Sets (because of deny and boolean operations on sets)
---
.../idp/attribute/resolver/impl/AttributeResolverImpl.java | 8 +++++++-
.../idp/attribute/resolver/impl/dc/scriptedConnector.js | 6 +++---
.../transcoding/impl/CASScopedStringAttributeTranscoderTest.java | 7 ++++---
.../transcoding/impl/CASStringAttributeTranscoderTest.java | 7 ++++---
.../idp/saml/saml2/profile/impl/FilterByQueriedAttributes.java | 5 +++--
.../transcoding/impl/SAML1ByteAttributeTranscoderTest.java | 8 ++++----
.../impl/SAML1ScopedStringAttributeTranscoderTest.java | 8 ++++----
.../transcoding/impl/SAML1StringAttributeTranscoderTest.java | 8 ++++----
.../transcoding/impl/SAML2ByteAttributeTranscoderTest.java | 8 ++++----
.../impl/SAML2ScopedStringAttributeTranscoderTest.java | 8 ++++----
.../transcoding/impl/SAML2StringAttributeTranscoderTest.java | 8 ++++----
.../transcoding/impl/SAML2XMLObjectAttributeTranscoderTest.java | 2 +-
12 files changed, 46 insertions(+), 37 deletions(-)
diff --git a/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/AttributeResolverImpl.java b/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/AttributeResolverImpl.java
index 326e97b..064f762 100644
--- a/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/AttributeResolverImpl.java
+++ b/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/AttributeResolverImpl.java
@@ -18,11 +18,13 @@
package net.shibboleth.idp.attribute.resolver.impl;
import java.time.Instant;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Function;
@@ -463,7 +465,9 @@ public class AttributeResolverImpl extends AbstractServiceableComponent<Attribut
log.debug("{} De-duping (and null filtering) attribute definition {} result",
logPrefix, definition.getId());
final Iterator<IdPAttributeValue> valueIter = resolvedAttribute.getValues().iterator();
+ final List<IdPAttributeValue> result = new ArrayList<>(resolvedAttribute.getValues().size());
final Set<IdPAttributeValue> monitor = new HashSet<>(resolvedAttribute.getValues().size());
+
while (valueIter.hasNext()) {
final IdPAttributeValue value = valueIter.next();
@@ -481,6 +485,8 @@ public class AttributeResolverImpl extends AbstractServiceableComponent<Attribut
if (!monitor.add(value)) {
log.debug("{} Removing duplicate value {} of attribute '{}' from resolution result", logPrefix,
value, resolvedAttribute.getId());
+ } else {
+ result.add(value);
}
}
@@ -491,7 +497,7 @@ public class AttributeResolverImpl extends AbstractServiceableComponent<Attribut
continue;
}
- resolvedAttribute.setValues(monitor);
+ resolvedAttribute.setValues(result);
log.debug("{} Attribute '{}' has {} values after post-processing", logPrefix, resolvedAttribute.getId(),
monitor.size());
diff --git a/idp-attribute-resolver-impl/src/test/resources/net/shibboleth/idp/attribute/resolver/impl/dc/scriptedConnector.js b/idp-attribute-resolver-impl/src/test/resources/net/shibboleth/idp/attribute/resolver/impl/dc/scriptedConnector.js
index e9dee04..118e8a6 100644
--- a/idp-attribute-resolver-impl/src/test/resources/net/shibboleth/idp/attribute/resolver/impl/dc/scriptedConnector.js
+++ b/idp-attribute-resolver-impl/src/test/resources/net/shibboleth/idp/attribute/resolver/impl/dc/scriptedConnector.js
@@ -3,14 +3,14 @@ importPackage(Packages.java.util);
importPackage(Packages.java.lang);
attr = new IdPAttribute("ScriptedOne");
-set = new HashSet(2);
+set = new LinkedHashSet(2);
set.add(new StringAttributeValue("Value 1"));
set.add(new StringAttributeValue("Value 2"));
attr.setValues(set);
connectorResults.add(attr);
attr = new IdPAttribute("TwoScripted");
-set = new HashSet(4);
+set = new LinkedHashSet(4);
set.add(new StringAttributeValue("1Value"));
set.add(new StringAttributeValue("2Value"));
set.add(new StringAttributeValue("3Value"));
@@ -18,7 +18,7 @@ attr.setValues(set);
connectorResults.add(attr);
attr = new IdPAttribute("Subjects");
-set = new HashSet(4);
+set = new LinkedHashSet(4);
x = subjects[0].getPrincipals().iterator();
while(x.hasNext()){
set.add(new StringAttributeValue(x.next().getName()));
diff --git a/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/attribute/transcoding/impl/CASScopedStringAttributeTranscoderTest.java b/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/attribute/transcoding/impl/CASScopedStringAttributeTranscoderTest.java
index 5c58fa4..27fc238 100644
--- a/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/attribute/transcoding/impl/CASScopedStringAttributeTranscoderTest.java
+++ b/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/attribute/transcoding/impl/CASScopedStringAttributeTranscoderTest.java
@@ -22,6 +22,7 @@ import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import java.util.Map;
import net.shibboleth.idp.attribute.AttributeEncodingException;
@@ -115,7 +116,7 @@ public class CASScopedStringAttributeTranscoderTest {
@Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
final int[] intArray = {1, 2, 3, 4};
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new IdPAttributeValue() {
@Override
public Object getNativeValue() {
@@ -138,7 +139,7 @@ public class CASScopedStringAttributeTranscoderTest {
}
@Test public void single() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
new ScopedStringAttributeValue(STRING_1, SCOPE_1),
new StringAttributeValue(STRING_1),
@@ -187,7 +188,7 @@ public class CASScopedStringAttributeTranscoderTest {
}
@Test public void multi() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
new ScopedStringAttributeValue(STRING_1, SCOPE_1),
new ScopedStringAttributeValue(STRING_2, SCOPE_2));
diff --git a/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/attribute/transcoding/impl/CASStringAttributeTranscoderTest.java b/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/attribute/transcoding/impl/CASStringAttributeTranscoderTest.java
index 3ab3892..16c1d92 100644
--- a/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/attribute/transcoding/impl/CASStringAttributeTranscoderTest.java
+++ b/idp-cas-impl/src/test/java/net/shibboleth/idp/cas/attribute/transcoding/impl/CASStringAttributeTranscoderTest.java
@@ -21,6 +21,7 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import org.testng.Assert;
@@ -110,7 +111,7 @@ public class CASStringAttributeTranscoderTest {
@Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
final int[] intArray = {1, 2, 3, 4};
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new IdPAttributeValue() {
@Override
public Object getNativeValue() {
@@ -133,7 +134,7 @@ public class CASStringAttributeTranscoderTest {
}
@Test public void single() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new StringAttributeValue(STRING_1));
final IdPAttribute inputAttribute = new IdPAttribute(ATTR_ID);
@@ -176,7 +177,7 @@ public class CASStringAttributeTranscoderTest {
}
@Test public void multi() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
new StringAttributeValue(STRING_1),
new StringAttributeValue(STRING_2),
diff --git a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/FilterByQueriedAttributes.java b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/FilterByQueriedAttributes.java
index 7674e91..717bca6 100644
--- a/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/FilterByQueriedAttributes.java
+++ b/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/saml2/profile/impl/FilterByQueriedAttributes.java
@@ -19,6 +19,7 @@ package net.shibboleth.idp.saml.saml2.profile.impl;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.List;
import java.util.function.Function;
import javax.annotation.Nonnull;
@@ -264,8 +265,8 @@ public class FilterByQueriedAttributes extends AbstractProfileAction {
@Nonnull @NonnullElements final Collection<IdPAttribute> requestedAttributes) {
boolean requestedValues = false;
-
- final Collection<IdPAttributeValue> keepers = new ArrayList<>(attribute.getValues().size());
+
+ final List<IdPAttributeValue> keepers = new ArrayList<>(attribute.getValues().size());
for (final IdPAttributeValue value : attribute.getValues()) {
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML1ByteAttributeTranscoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML1ByteAttributeTranscoderTest.java
index 852e78d..05b33e6 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML1ByteAttributeTranscoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML1ByteAttributeTranscoderTest.java
@@ -174,7 +174,7 @@ public class SAML1ByteAttributeTranscoderTest extends OpenSAMLInitBaseTestCase {
@Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
final int[] intArray = {1, 2, 3, 4};
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new StringAttributeValue("foo"), new ScopedStringAttributeValue("foo", "bar"),
new IdPAttributeValue() {
public Object getNativeValue() {
@@ -196,7 +196,7 @@ public class SAML1ByteAttributeTranscoderTest extends OpenSAMLInitBaseTestCase {
}
@Test public void single() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new StringAttributeValue("foo"), new ByteAttributeValue(BYTE_ARRAY_1));
final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
@@ -231,7 +231,7 @@ public class SAML1ByteAttributeTranscoderTest extends OpenSAMLInitBaseTestCase {
}
@Test public void singleRequested() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new StringAttributeValue("foo"), new ByteAttributeValue(BYTE_ARRAY_1));
final IdPRequestedAttribute inputAttribute = new IdPRequestedAttribute(ATTR_NAME);
@@ -289,7 +289,7 @@ public class SAML1ByteAttributeTranscoderTest extends OpenSAMLInitBaseTestCase {
}
@Test public void multi() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(BYTE_ARRAY_1), new ByteAttributeValue(BYTE_ARRAY_2));
final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML1ScopedStringAttributeTranscoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML1ScopedStringAttributeTranscoderTest.java
index 2fc70a2..6fafe80 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML1ScopedStringAttributeTranscoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML1ScopedStringAttributeTranscoderTest.java
@@ -167,7 +167,7 @@ public class SAML1ScopedStringAttributeTranscoderTest extends OpenSAMLInitBaseTe
@Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
final int[] intArray = {1, 2, 3, 4};
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new IdPAttributeValue() {
@Override
public Object getNativeValue() {
@@ -190,7 +190,7 @@ public class SAML1ScopedStringAttributeTranscoderTest extends OpenSAMLInitBaseTe
}
@Test public void single() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
new ScopedStringAttributeValue(STRING_1, SCOPE_1),
new StringAttributeValue(STRING_1),
@@ -228,7 +228,7 @@ public class SAML1ScopedStringAttributeTranscoderTest extends OpenSAMLInitBaseTe
}
@Test public void singleRequested() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
new ScopedStringAttributeValue(STRING_1, SCOPE_1));
@@ -275,7 +275,7 @@ public class SAML1ScopedStringAttributeTranscoderTest extends OpenSAMLInitBaseTe
}
@Test public void multi() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
new ScopedStringAttributeValue(STRING_1, SCOPE_1),
new ScopedStringAttributeValue(STRING_2, SCOPE_2));
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML1StringAttributeTranscoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML1StringAttributeTranscoderTest.java
index ee194b1..6944576 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML1StringAttributeTranscoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML1StringAttributeTranscoderTest.java
@@ -171,7 +171,7 @@ public class SAML1StringAttributeTranscoderTest extends OpenSAMLInitBaseTestCase
@Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
final int[] intArray = {1, 2, 3, 4};
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new IdPAttributeValue() {
@Override
public Object getNativeValue() {
@@ -194,7 +194,7 @@ public class SAML1StringAttributeTranscoderTest extends OpenSAMLInitBaseTestCase
}
@Test public void single() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new StringAttributeValue(STRING_1));
final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
@@ -228,7 +228,7 @@ public class SAML1StringAttributeTranscoderTest extends OpenSAMLInitBaseTestCase
}
@Test public void singleRequested() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new StringAttributeValue(STRING_1));
final IdPRequestedAttribute inputAttribute = new IdPRequestedAttribute(ATTR_NAME);
@@ -269,7 +269,7 @@ public class SAML1StringAttributeTranscoderTest extends OpenSAMLInitBaseTestCase
}
@Test public void multi() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
new StringAttributeValue(STRING_1),
new StringAttributeValue(STRING_2),
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML2ByteAttributeTranscoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML2ByteAttributeTranscoderTest.java
index 57afb3f..1dfca7b 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML2ByteAttributeTranscoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML2ByteAttributeTranscoderTest.java
@@ -167,7 +167,7 @@ public class SAML2ByteAttributeTranscoderTest extends OpenSAMLInitBaseTestCase {
@Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
final int[] intArray = {1, 2, 3, 4};
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new StringAttributeValue("foo"), new ScopedStringAttributeValue("foo", "bar"),
new IdPAttributeValue() {
public Object getNativeValue() {
@@ -189,7 +189,7 @@ public class SAML2ByteAttributeTranscoderTest extends OpenSAMLInitBaseTestCase {
}
@Test public void single() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new StringAttributeValue("foo"), new ByteAttributeValue(BYTE_ARRAY_1));
final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
@@ -225,7 +225,7 @@ public class SAML2ByteAttributeTranscoderTest extends OpenSAMLInitBaseTestCase {
}
@Test public void singleRequested() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new StringAttributeValue("foo"), new ByteAttributeValue(BYTE_ARRAY_1));
final IdPRequestedAttribute inputAttribute = new IdPRequestedAttribute(ATTR_NAME);
@@ -326,7 +326,7 @@ public class SAML2ByteAttributeTranscoderTest extends OpenSAMLInitBaseTestCase {
}
@Test public void multi() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(BYTE_ARRAY_1), new ByteAttributeValue(BYTE_ARRAY_2));
final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML2ScopedStringAttributeTranscoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML2ScopedStringAttributeTranscoderTest.java
index 1dc66fb..9d95629 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML2ScopedStringAttributeTranscoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML2ScopedStringAttributeTranscoderTest.java
@@ -169,7 +169,7 @@ public class SAML2ScopedStringAttributeTranscoderTest extends OpenSAMLInitBaseTe
@Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
final int[] intArray = {1, 2, 3, 4};
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new IdPAttributeValue() {
@Override
public Object getNativeValue() {
@@ -192,7 +192,7 @@ public class SAML2ScopedStringAttributeTranscoderTest extends OpenSAMLInitBaseTe
}
@Test public void single() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
new ScopedStringAttributeValue(STRING_1, SCOPE_1),
new StringAttributeValue(STRING_1),
@@ -230,7 +230,7 @@ public class SAML2ScopedStringAttributeTranscoderTest extends OpenSAMLInitBaseTe
}
@Test public void singleRequested() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
new ScopedStringAttributeValue(STRING_1, SCOPE_1));
@@ -321,7 +321,7 @@ public class SAML2ScopedStringAttributeTranscoderTest extends OpenSAMLInitBaseTe
}
@Test public void multi() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
new ScopedStringAttributeValue(STRING_1, SCOPE_1),
new ScopedStringAttributeValue(STRING_2, SCOPE_2));
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML2StringAttributeTranscoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML2StringAttributeTranscoderTest.java
index 15156bd..2b25b02 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML2StringAttributeTranscoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML2StringAttributeTranscoderTest.java
@@ -164,7 +164,7 @@ public class SAML2StringAttributeTranscoderTest extends OpenSAMLInitBaseTestCase
@Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
final int[] intArray = {1, 2, 3, 4};
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new IdPAttributeValue() {
@Override
public Object getNativeValue() {
@@ -187,7 +187,7 @@ public class SAML2StringAttributeTranscoderTest extends OpenSAMLInitBaseTestCase
}
@Test public void single() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new StringAttributeValue(STRING_1));
final IdPAttribute inputAttribute = new IdPAttribute(ATTR_NAME);
@@ -222,7 +222,7 @@ public class SAML2StringAttributeTranscoderTest extends OpenSAMLInitBaseTestCase
}
@Test public void singleRequested() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new StringAttributeValue(STRING_1));
final IdPRequestedAttribute inputAttribute = new IdPRequestedAttribute(ATTR_NAME);
@@ -306,7 +306,7 @@ public class SAML2StringAttributeTranscoderTest extends OpenSAMLInitBaseTestCase
}
@Test public void multi() throws Exception {
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}),
new StringAttributeValue(STRING_1),
new StringAttributeValue(STRING_2),
diff --git a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML2XMLObjectAttributeTranscoderTest.java b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML2XMLObjectAttributeTranscoderTest.java
index fca9ef2..fadc774 100644
--- a/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML2XMLObjectAttributeTranscoderTest.java
+++ b/idp-saml-impl/src/test/java/net/shibboleth/idp/saml/attribute/transcoding/impl/SAML2XMLObjectAttributeTranscoderTest.java
@@ -171,7 +171,7 @@ public class SAML2XMLObjectAttributeTranscoderTest extends OpenSAMLInitBaseTestC
@Test(expectedExceptions = {AttributeEncodingException.class,}) public void inappropriate() throws Exception {
final int[] intArray = {1, 2, 3, 4};
- final Collection<IdPAttributeValue> values =
+ final List<IdPAttributeValue> values =
Arrays.asList(new ByteAttributeValue(new byte[] {1, 2, 3,}), new IdPAttributeValue() {
@Override
public Object getNativeValue() {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list