diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/identifier/common/AbstractCommonIdentifier.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/identifier/common/AbstractCommonIdentifier.java index 969131c20..5b7d95948 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/identifier/common/AbstractCommonIdentifier.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/auth/identifier/common/AbstractCommonIdentifier.java @@ -3,6 +3,7 @@ package edu.cornell.mannlib.vitro.webapp.auth.identifier.common; import java.util.Collection; +import java.util.Collections; import java.util.HashSet; import java.util.Set; @@ -14,8 +15,16 @@ import edu.cornell.mannlib.vitro.webapp.auth.identifier.IdentifierBundle; * CommonIdentifierBundleFactory. */ public abstract class AbstractCommonIdentifier { - protected static Collection getIdentifiersForClass( + + /** + * Get all of the instances of this class of Identifier from this bundle. + */ + protected static Collection getIdentifiersForClass( IdentifierBundle ids, Class clazz) { + if ((ids == null) || (clazz == null)) { + return Collections.emptySet(); + } + Set set = new HashSet(); for (Identifier id : ids) { if (clazz.isAssignableFrom(id.getClass())) {