diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/identifier/ArrayIdentifierBundle.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/identifier/ArrayIdentifierBundle.java index 8686c54be..d0ca09e12 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/identifier/ArrayIdentifierBundle.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/identifier/ArrayIdentifierBundle.java @@ -3,12 +3,19 @@ package edu.cornell.mannlib.vitro.webapp.auth.identifier; import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; /** - * Most common implementation of a List of Identifiers (IdentifierBundle). - * @author bdc34 - * + * Most common implementation of a List of Identifiers (IdentifierBundle). */ -public class ArrayIdentifierBundle extends ArrayList implements IdentifierBundle{ - +public class ArrayIdentifierBundle extends ArrayList implements + IdentifierBundle { + public ArrayIdentifierBundle(Collection ids) { + super(ids); + } + + public ArrayIdentifierBundle(Identifier... ids) { + this(Arrays.asList(ids)); + } } diff --git a/webapp/test/edu/cornell/mannlib/vitro/webapp/auth/policy/SelfEditingPolicyTest.java b/webapp/test/edu/cornell/mannlib/vitro/webapp/auth/policy/SelfEditingPolicyTest.java index f1858e094..61da9cbe0 100644 --- a/webapp/test/edu/cornell/mannlib/vitro/webapp/auth/policy/SelfEditingPolicyTest.java +++ b/webapp/test/edu/cornell/mannlib/vitro/webapp/auth/policy/SelfEditingPolicyTest.java @@ -74,8 +74,7 @@ public class SelfEditingPolicyTest extends AbstractTestClass { IndividualImpl ind = new IndividualImpl(); ind.setURI(SELFEDITOR_URI); - ids = new ArrayIdentifierBundle(); - ids.add(new HasProfile(SELFEDITOR_URI)); + ids = new ArrayIdentifierBundle(new HasProfile(SELFEDITOR_URI)); } @Test diff --git a/webapp/test/edu/cornell/mannlib/vitro/webapp/auth/policy/SelfEditingPolicy_2_Test.java b/webapp/test/edu/cornell/mannlib/vitro/webapp/auth/policy/SelfEditingPolicy_2_Test.java index e0238bc1f..40d748341 100644 --- a/webapp/test/edu/cornell/mannlib/vitro/webapp/auth/policy/SelfEditingPolicy_2_Test.java +++ b/webapp/test/edu/cornell/mannlib/vitro/webapp/auth/policy/SelfEditingPolicy_2_Test.java @@ -94,8 +94,7 @@ public class SelfEditingPolicy_2_Test extends AbstractTestClass { seIndividual = new IndividualImpl(); seIndividual.setURI(SELFEDITOR_URI); - ids = new ArrayIdentifierBundle(); - ids.add(new HasProfile(SELFEDITOR_URI)); + ids = new ArrayIdentifierBundle(new HasProfile(SELFEDITOR_URI)); // setLoggerLevel(SelfEditingPolicySetupTest.class, Level.DEBUG); }