[java-metadata-aggregator] branch main updated: MDA-253 - Stage should execute over a List, not a Collection

Ian Young ian at iay.org.uk
Wed Aug 19 15:33:16 UTC 2020


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

iay pushed a commit to branch main
in repository java-metadata-aggregator.

View the commit online:
http://git.shibboleth.net/view/?p=java-metadata-aggregator.git;a=commit;h=7aa398a543464f4c8dd79030e78b94554be73e0f

The following commit(s) were added to refs/heads/main by this push:
       new  7aa398a   MDA-253 - Stage should execute over a List, not a Collection
7aa398a is described below

commit 7aa398a543464f4c8dd79030e78b94554be73e0f
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Wed Aug 19 16:33:11 2020 +0100

    MDA-253 - Stage should execute over a List, not a Collection
    
    https://issues.shibboleth.net/jira/browse/MDA-253
---
 .../net/shibboleth/metadata/cli/MDA137Stage.java   |  4 +--
 .../metadata/CollectionMergeStrategy.java          | 12 ++++---
 .../metadata/DeduplicatingItemIdMergeStrategy.java | 11 +++----
 .../metadata/SimpleCollectionMergeStrategy.java    |  8 ++---
 .../metadata/SimpleItemCollectionFactory.java      |  6 ++--
 .../metadata/dom/AbstractXSLProcessingStage.java   |  9 +++---
 .../metadata/dom/DOMElementSerializer.java         |  2 +-
 .../metadata/dom/DOMFilesystemSourceStage.java     |  5 ++-
 .../metadata/dom/DOMResourceSourceStage.java       | 12 +++----
 .../dom/MultiOutputXSLTransformationStage.java     |  8 ++---
 .../metadata/dom/XMLSignatureSigningStage.java     |  5 ++-
 .../metadata/dom/XMLSignatureValidationStage.java  |  5 +--
 .../metadata/dom/XPathFilteringStage.java          |  4 +--
 .../metadata/dom/XSLTransformationStage.java       |  8 ++---
 .../metadata/dom/XSLValidationStage.java           |  4 +--
 .../dom/saml/EntitiesDescriptorAssemblerStage.java | 13 ++++----
 .../saml/EntitiesDescriptorDisassemblerStage.java  | 37 +++++++++++-----------
 .../saml/mdattr/EntityAttributeAddingStage.java    |  5 ++-
 .../metadata/pipeline/AbstractFilteringStage.java  |  6 ++--
 .../AbstractItemMetadataSelectionStage.java        | 12 +++----
 .../metadata/pipeline/AbstractIteratingStage.java  |  6 ++--
 .../metadata/pipeline/AbstractStage.java           | 13 ++++----
 .../metadata/pipeline/CompositeStage.java          |  5 ++-
 .../metadata/pipeline/FutureSupport.java           |  8 ++---
 .../metadata/pipeline/ItemMetadataFilterStage.java | 11 +++----
 .../pipeline/ItemMetadataTerminationStage.java     |  9 +++---
 .../metadata/pipeline/ItemOrderingStage.java       | 10 +++---
 .../metadata/pipeline/ItemOrderingStrategy.java    |  3 +-
 .../net/shibboleth/metadata/pipeline/Pipeline.java |  5 ++-
 .../metadata/pipeline/PipelineCallable.java        | 36 ++++++++++-----------
 .../pipeline/PipelineDemultiplexerStage.java       | 17 +++++-----
 .../metadata/pipeline/PipelineMergeStage.java      | 21 ++++++------
 .../metadata/pipeline/ScriptletStage.java          |  6 ++--
 .../metadata/pipeline/SerializationStage.java      |  6 ++--
 .../metadata/pipeline/SimplePipeline.java          |  7 ++--
 .../metadata/pipeline/SplitMergeStage.java         | 30 +++++++++---------
 .../net/shibboleth/metadata/pipeline/Stage.java    |  6 ++--
 .../metadata/pipeline/StaticItemSourceStage.java   | 13 +++-----
 .../pipeline/StatusMetadataLoggingStage.java       |  9 +++---
 .../pipeline/impl/NoOpItemOrderingStrategy.java    |  3 +-
 .../metadata/dom/CRDetectionStageTest.java         |  6 ++--
 .../metadata/dom/XMLSchemaValidationStageTest.java | 13 ++++----
 .../dom/saml/ContactPersonFilterStageTest.java     | 16 +++++-----
 .../saml/EntitiesDescriptorAssemblerStageTest.java | 23 +++++++-------
 .../metadata/dom/saml/EntityFilterStageTest.java   | 17 +++++-----
 .../mdattr/EntityAttributeAddingStageTest.java     | 30 +++++++++---------
 ...EntityRegistrationAuthorityFilterStageTest.java |  7 ++--
 .../metadata/pipeline/CountingStage.java           |  6 ++--
 .../pipeline/ItemMetadataFilterStageTest.java      |  7 ++--
 .../pipeline/ItemMetadataTerminationStageTest.java |  9 +++---
 .../metadata/pipeline/ItemOrderingStageTest.java   |  3 +-
 .../metadata/pipeline/PipelineMergeStageTest.java  | 11 ++-----
 .../metadata/pipeline/TerminatingStage.java        |  6 ++--
 53 files changed, 266 insertions(+), 288 deletions(-)

diff --git a/aggregator-cli/src/test/java/net/shibboleth/metadata/cli/MDA137Stage.java b/aggregator-cli/src/test/java/net/shibboleth/metadata/cli/MDA137Stage.java
index 04d6be8..47e3d3f 100644
--- a/aggregator-cli/src/test/java/net/shibboleth/metadata/cli/MDA137Stage.java
+++ b/aggregator-cli/src/test/java/net/shibboleth/metadata/cli/MDA137Stage.java
@@ -17,7 +17,7 @@
 
 package net.shibboleth.metadata.cli;
 
-import java.util.Collection;
+import java.util.List;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -37,7 +37,7 @@ public class MDA137Stage<T> extends AbstractStage<T> {
     private final Logger log = LoggerFactory.getLogger(MDA137Stage.class);
 
     @Override
-    protected void doExecute(Collection<Item<T>> itemCollection) throws StageProcessingException {
+    protected void doExecute(List<Item<T>> items) throws StageProcessingException {
         // Do absolutely nothing
     }
 
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/CollectionMergeStrategy.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/CollectionMergeStrategy.java
index e3988ff..36d9b35 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/CollectionMergeStrategy.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/CollectionMergeStrategy.java
@@ -17,20 +17,24 @@
 
 package net.shibboleth.metadata;
 
-import java.util.Collection;
 import java.util.List;
 
 import javax.annotation.Nonnull;
 import javax.annotation.concurrent.ThreadSafe;
 
+import net.shibboleth.metadata.pipeline.PipelineMergeStage;
+import net.shibboleth.metadata.pipeline.SplitMergeStage;
 import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
 
 /**
- * Strategy used to merge the results of each child pipeline in to the collection of Items given to this stage.
+ * Strategy used to merge the a number of source item collections into a target item collection.
  * 
  * <p>
  * All implementations of this interface <strong>must</strong> be thread-safe.
  * </p>
+ * 
+ * @see PipelineMergeStage
+ * @see SplitMergeStage
  */
 @ThreadSafe
 public interface CollectionMergeStrategy {
@@ -42,6 +46,6 @@ public interface CollectionMergeStrategy {
      * @param sources collections of Items to be merged in to the target, never null not containing any null elements
      * @param <T> type of data contained in the items
      */
-    <T> void mergeCollection(@Nonnull @NonnullElements Collection<Item<T>> target,
-            @Nonnull @NonnullElements List<Collection<Item<T>>> sources);
+    <T> void merge(@Nonnull @NonnullElements List<Item<T>> target,
+            @Nonnull @NonnullElements List<List<Item<T>>> sources);
 }
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/DeduplicatingItemIdMergeStrategy.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/DeduplicatingItemIdMergeStrategy.java
index 69cdfed..cf61506 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/DeduplicatingItemIdMergeStrategy.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/DeduplicatingItemIdMergeStrategy.java
@@ -17,7 +17,6 @@
 
 package net.shibboleth.metadata;
 
-import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
 
@@ -36,8 +35,8 @@ import net.shibboleth.utilities.java.support.logic.Constraint;
 public class DeduplicatingItemIdMergeStrategy implements CollectionMergeStrategy {
 
     @Override
-    public <T> void mergeCollection(@Nonnull @NonnullElements final Collection<Item<T>> target,
-            @Nonnull @NonnullElements final List<Collection<Item<T>>> sources) {
+    public <T> void merge(@Nonnull @NonnullElements final List<Item<T>> target,
+            @Nonnull @NonnullElements final List<List<Item<T>>> sources) {
         Constraint.isNotNull(target, "Target collection can not be null");
         Constraint.isNotNull(sources, "Source collections can not be null or empty");
         
@@ -50,7 +49,7 @@ public class DeduplicatingItemIdMergeStrategy implements CollectionMergeStrategy
             }
         }
 
-        for (final Collection<Item<T>> source : sources) {
+        for (final List<Item<T>> source : sources) {
             merge(presentItemIds, target, source);
         }
     }
@@ -66,8 +65,8 @@ public class DeduplicatingItemIdMergeStrategy implements CollectionMergeStrategy
      * @param <T> type of data contained in the items
      */
     private <T> void merge(@Nonnull @NonnullElements final HashSet<ItemId> presentItemIds,
-            @Nonnull @NonnullElements final Collection<Item<T>> target,
-            @Nonnull @NonnullElements final Collection<Item<T>> sourceItems) {
+            @Nonnull @NonnullElements final List<Item<T>> target,
+            @Nonnull @NonnullElements final List<Item<T>> sourceItems) {
         for (final Item<T> sourceItem : sourceItems) {
             final var itemIds = sourceItem.getItemMetadata().get(ItemId.class);
             if (itemIds == null || itemIds.isEmpty()) {
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/SimpleCollectionMergeStrategy.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/SimpleCollectionMergeStrategy.java
index 059174b..ce8419e 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/SimpleCollectionMergeStrategy.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/SimpleCollectionMergeStrategy.java
@@ -28,18 +28,18 @@ import net.shibboleth.utilities.java.support.logic.Constraint;
 
 /**
  * A {@link CollectionMergeStrategy} that adds the Item from each source, in order, by means of the
- * {@link Collection#addAll(Collection)} method on the target.
+ * {@link List#addAll(Collection)} method on the target.
  */
 @Immutable
 public class SimpleCollectionMergeStrategy implements CollectionMergeStrategy {
 
     @Override
-    public <T> void mergeCollection(@Nonnull @NonnullElements final Collection<Item<T>> target,
-            @Nonnull @NonnullElements final List<Collection<Item<T>>> sources) {
+    public <T> void merge(@Nonnull @NonnullElements final List<Item<T>> target,
+            @Nonnull @NonnullElements final List<List<Item<T>>> sources) {
         Constraint.isNotNull(target, "Target collection can not be null");
         Constraint.isNotNull(sources, "Source collections can not be null or empty");
 
-        for (final Collection<Item<T>> source : sources) {
+        for (final var source : sources) {
             target.addAll(source);
         }
     }
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/SimpleItemCollectionFactory.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/SimpleItemCollectionFactory.java
index 86fd350..4b4c7de 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/SimpleItemCollectionFactory.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/SimpleItemCollectionFactory.java
@@ -18,7 +18,7 @@
 package net.shibboleth.metadata;
 
 import java.util.ArrayList;
-import java.util.Collection;
+import java.util.List;
 import java.util.function.Supplier;
 
 import javax.annotation.Nonnull;
@@ -30,10 +30,10 @@ import javax.annotation.concurrent.Immutable;
  * @param <T> the type of items the produced collection will contain
  */
 @Immutable
-public class SimpleItemCollectionFactory<T> implements Supplier<Collection<Item<T>>> {
+public class SimpleItemCollectionFactory<T> implements Supplier<List<Item<T>>> {
 
     @Override
-    @Nonnull public Collection<Item<T>> get() {
+    @Nonnull public List<Item<T>> get() {
         return new ArrayList<>();
     }
 
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/AbstractXSLProcessingStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/AbstractXSLProcessingStage.java
index e8c8f97..09f2ba3 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/AbstractXSLProcessingStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/AbstractXSLProcessingStage.java
@@ -19,6 +19,7 @@ package net.shibboleth.metadata.dom;
 
 import java.io.IOException;
 import java.util.Collection;
+import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 
@@ -217,7 +218,7 @@ public abstract class AbstractXSLProcessingStage extends AbstractStage<Element>
     }
 
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<Element>> itemCollection)
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<Element>> items)
             throws StageProcessingException {
         try {
             /*
@@ -237,7 +238,7 @@ public abstract class AbstractXSLProcessingStage extends AbstractStage<Element>
                 transformer.setParameter(entry.getKey(), entry.getValue());
             }
 
-            executeTransformer(transformer, itemCollection);
+            executeTransformer(transformer, items);
         } catch (final TransformerConfigurationException e) {
             throw new RuntimeException("XSL transformation engine misconfigured", e);
         }
@@ -247,13 +248,13 @@ public abstract class AbstractXSLProcessingStage extends AbstractStage<Element>
      * Executes the XSLT transform on the given collection of Items.
      * 
      * @param transformer The transform to be applied to each Item. Already has all {@link #transformParameters} set.
-     * @param itemCollection the Items to which the transform should be applied
+     * @param items the Items to which the transform should be applied
      * 
      * @throws StageProcessingException thrown if there is a problem applying the transform to Items
      * @throws TransformerConfigurationException thrown if there is a problem with the Transform itself
      */
     protected abstract void executeTransformer(@Nonnull final Transformer transformer,
-            @Nonnull @NonnullElements final Collection<Item<Element>> itemCollection) throws StageProcessingException,
+            @Nonnull @NonnullElements final Collection<Item<Element>> items) throws StageProcessingException,
             TransformerConfigurationException;
 
     @Override
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/DOMElementSerializer.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/DOMElementSerializer.java
index 457ba70..994aba3 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/DOMElementSerializer.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/DOMElementSerializer.java
@@ -44,7 +44,7 @@ import org.w3c.dom.Element;
  * {@link Element}-based {@link Item}.
  * 
  * When used as an {@link ItemCollectionSerializer}, just serializes the first {@link Item} in the collection.
- * This will result in well-formed XML, but other items in the collection will simply be ignored.
+ * This will result in well-formed XML, but any other items in the collection will simply be ignored.
  */
 @ThreadSafe
 public class DOMElementSerializer implements ItemSerializer<Element>, ItemCollectionSerializer<Element> {
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/DOMFilesystemSourceStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/DOMFilesystemSourceStage.java
index 184ff49..68d4ef4 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/DOMFilesystemSourceStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/DOMFilesystemSourceStage.java
@@ -22,7 +22,6 @@ import java.io.FileFilter;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.List;
 
 import javax.annotation.Nonnull;
@@ -208,7 +207,7 @@ public class DOMFilesystemSourceStage extends AbstractStage<Element> {
     }
 
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<Element>> itemCollection)
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<Element>> items)
             throws StageProcessingException {
         final ArrayList<File> sourceFiles = new ArrayList<>();
 
@@ -230,7 +229,7 @@ public class DOMFilesystemSourceStage extends AbstractStage<Element> {
         for (final File source : sourceFiles) {
             final var dme = processSourceFile(source);
             if (dme != null) {
-                itemCollection.add(dme);
+                items.add(dme);
             }
         }
     }
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/DOMResourceSourceStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/DOMResourceSourceStage.java
index 45708cc..da8634c 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/DOMResourceSourceStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/DOMResourceSourceStage.java
@@ -19,7 +19,7 @@ package net.shibboleth.metadata.dom;
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.util.Collection;
+import java.util.List;
 
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
@@ -130,7 +130,7 @@ public class DOMResourceSourceStage extends AbstractStage<Element> {
     }
 
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<Element>> itemCollection)
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<Element>> items)
             throws StageProcessingException {
 
         final var resource = getDOMResource();
@@ -138,7 +138,7 @@ public class DOMResourceSourceStage extends AbstractStage<Element> {
         log.debug("Attempting to fetch XML document from '{}'", resource.getDescription());
 
         try (InputStream ins = resource.getInputStream()) {
-            populateItemCollection(itemCollection, ins, resource);
+            populateItemCollection(items, ins, resource);
         } catch (final IOException e) {
             if (getErrorCausesSourceFailure()) {
                 throw new StageProcessingException("Error retrieving XML document from " +
@@ -153,17 +153,17 @@ public class DOMResourceSourceStage extends AbstractStage<Element> {
      * Builds an {@link DOMElementItem} collection from a new XML document. Also caches DOM Element in its parsed form
      * for later use.
      * 
-     * @param itemCollection collection to which the read in and parsed document element is added
+     * @param items collection to which the read in and parsed document element is added
      * @param data XML input file
      * @param resource the resource to read from
      * 
      * @throws StageProcessingException thrown if there is a problem reading and parsing the response
      */
-    protected void populateItemCollection(@Nonnull @NonnullElements final Collection<Item<Element>> itemCollection,
+    protected void populateItemCollection(@Nonnull @NonnullElements final List<Item<Element>> items,
             @Nonnull final InputStream data, @Nonnull final Resource resource) throws StageProcessingException {
         try {
             log.debug("Parsing XML document retrieved from '{}'", resource.getDescription());
-            itemCollection.add(new DOMElementItem(getParserPool().parse(data)));
+            items.add(new DOMElementItem(getParserPool().parse(data)));
         } catch (final XMLParserException e) {
             if (getErrorCausesSourceFailure()) {
                 throw new StageProcessingException(getId() + " unable to parse returned XML document " +
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/MultiOutputXSLTransformationStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/MultiOutputXSLTransformationStage.java
index 56afd80..6bc0aac 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/MultiOutputXSLTransformationStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/MultiOutputXSLTransformationStage.java
@@ -48,12 +48,12 @@ public class MultiOutputXSLTransformationStage extends AbstractXSLProcessingStag
 
     @Override
     protected void executeTransformer(@Nonnull final Transformer transformer,
-            @Nonnull @NonnullElements final Collection<Item<Element>> itemCollection) throws StageProcessingException,
+            @Nonnull @NonnullElements final Collection<Item<Element>> items) throws StageProcessingException,
             TransformerConfigurationException {
 
         try {
             final ArrayList<Item<Element>> newItems = new ArrayList<>();
-            for (final Item<Element> domItem : itemCollection) {
+            for (final Item<Element> domItem : items) {
                 transformer.setErrorListener(new StatusInfoAppendingErrorListener(domItem));
                 final Element element = domItem.unwrap();
 
@@ -71,8 +71,8 @@ public class MultiOutputXSLTransformationStage extends AbstractXSLProcessingStag
                     newItems.add(newItem);
                 }
             }
-            itemCollection.clear();
-            itemCollection.addAll(newItems);
+            items.clear();
+            items.addAll(newItems);
         } catch (final TransformerException e) {
             throw new StageProcessingException("Unable to transform DOM Element", e);
         }
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XMLSignatureSigningStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XMLSignatureSigningStage.java
index 3f04b67..11f56cb 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XMLSignatureSigningStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XMLSignatureSigningStage.java
@@ -21,7 +21,6 @@ import java.security.PrivateKey;
 import java.security.PublicKey;
 import java.security.cert.X509CRL;
 import java.security.cert.X509Certificate;
-import java.util.Collection;
 import java.util.List;
 
 import javax.annotation.Nonnull;
@@ -513,10 +512,10 @@ public class XMLSignatureSigningStage extends AbstractStage<Element> {
     }
 
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<Element>> itemCollection)
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<Element>> items)
             throws StageProcessingException {
         final var signer = new XMLSignatureSigner(this, log);
-        for (final Item<Element> item : itemCollection) {
+        for (final Item<Element> item : items) {
             signer.sign(item);
         }
     }
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XMLSignatureValidationStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XMLSignatureValidationStage.java
index be6d7a5..e2391ff 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XMLSignatureValidationStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XMLSignatureValidationStage.java
@@ -20,6 +20,7 @@ package net.shibboleth.metadata.dom;
 import java.security.PublicKey;
 import java.security.cert.Certificate;
 import java.util.Collection;
+import java.util.List;
 import java.util.Set;
 
 import javax.annotation.Nonnull;
@@ -281,13 +282,13 @@ public class XMLSignatureValidationStage extends AbstractStage<Element> {
     }
 
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<Element>> itemCollection) {
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<Element>> items) {
         // Create a single non-thread-safe validator
         final var validator = new XMLSignatureValidator(getVerificationKey(),
                 getBlacklistedDigests(), getBlacklistedSignatureMethods(), isPermittingEmptyReferences());
 
         // Use it to validate each item in turn
-        for (@Nonnull final var item : itemCollection) {
+        for (@Nonnull final var item : items) {
             validateItem(item, validator);
         }
     }
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XPathFilteringStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XPathFilteringStage.java
index 77559c8..edfee3c 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XPathFilteringStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XPathFilteringStage.java
@@ -17,8 +17,8 @@
 
 package net.shibboleth.metadata.dom;
 
-import java.util.Collection;
 import java.util.Iterator;
+import java.util.List;
 
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
@@ -114,7 +114,7 @@ public class XPathFilteringStage extends AbstractStage<Element> {
     }
 
     @Override
-    public void doExecute(@Nonnull @NonnullElements final Collection<Item<Element>> metadataCollection)
+    public void doExecute(@Nonnull @NonnullElements final List<Item<Element>> metadataCollection)
             throws StageProcessingException {
         final XPathFactory factory = XPathFactory.newInstance();
         final XPath xpath = factory.newXPath();
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XSLTransformationStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XSLTransformationStage.java
index 20f6437..6b5c978 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XSLTransformationStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XSLTransformationStage.java
@@ -48,12 +48,12 @@ public class XSLTransformationStage extends AbstractXSLProcessingStage {
 
     @Override
     protected void executeTransformer(@Nonnull final Transformer transformer,
-            @Nonnull @NonnullElements final Collection<Item<Element>> itemCollection) throws StageProcessingException,
+            @Nonnull @NonnullElements final Collection<Item<Element>> items) throws StageProcessingException,
             TransformerConfigurationException {
 
         try {
             final ArrayList<Item<Element>> newItems = new ArrayList<>();
-            for (final Item<Element> domItem : itemCollection) {
+            for (final Item<Element> domItem : items) {
                 transformer.setErrorListener(new StatusInfoAppendingErrorListener(domItem));
                 final Element element = domItem.unwrap();
 
@@ -69,8 +69,8 @@ public class XSLTransformationStage extends AbstractXSLProcessingStage {
                 newItem.getItemMetadata().putAll(domItem.getItemMetadata());
                 newItems.add(newItem);
             }
-            itemCollection.clear();
-            itemCollection.addAll(newItems);
+            items.clear();
+            items.addAll(newItems);
         } catch (final TransformerException e) {
             throw new StageProcessingException("Unable to transform DOM Element", e);
         }
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XSLValidationStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XSLValidationStage.java
index 0fcb020..04c3dd5 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XSLValidationStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/XSLValidationStage.java
@@ -44,11 +44,11 @@ public class XSLValidationStage extends AbstractXSLProcessingStage {
 
     @Override
     protected void executeTransformer(@Nonnull final Transformer transformer,
-            @Nonnull @NonnullElements final Collection<Item<Element>> itemCollection) throws StageProcessingException,
+            @Nonnull @NonnullElements final Collection<Item<Element>> items) throws StageProcessingException,
             TransformerConfigurationException {
 
         try {
-            for (final Item<Element> domItem : itemCollection) {
+            for (final Item<Element> domItem : items) {
                 transformer.setErrorListener(new StatusInfoAppendingErrorListener(domItem));
                 transformer.transform(new DOMSource(domItem.unwrap().getOwnerDocument()), new DOMResult());
             }
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/EntitiesDescriptorAssemblerStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/EntitiesDescriptorAssemblerStage.java
index 854523b..058e478 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/EntitiesDescriptorAssemblerStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/EntitiesDescriptorAssemblerStage.java
@@ -17,7 +17,6 @@
 
 package net.shibboleth.metadata.dom.saml;
 
-import java.util.Collection;
 import java.util.List;
 
 import javax.annotation.Nonnull;
@@ -132,9 +131,9 @@ public class EntitiesDescriptorAssemblerStage extends AbstractStage<Element> {
     }
 
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<Element>> itemCollection)
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<Element>> items)
             throws StageProcessingException {
-        if (itemCollection.isEmpty()) {
+        if (items.isEmpty()) {
             if (isNoChildrenAProcessingError()) {
                 throw new StageProcessingException("Unable to assemble EntitiesDescriptor from an empty collection");
             }
@@ -143,7 +142,7 @@ public class EntitiesDescriptorAssemblerStage extends AbstractStage<Element> {
         }
 
         final DOMImplementation domImpl =
-                itemCollection.iterator().next().unwrap().getOwnerDocument().getImplementation();
+                items.iterator().next().unwrap().getOwnerDocument().getImplementation();
         final Document entitiesDescriptorDocument = domImpl.createDocument(null, null, null);
 
         final Element entitiesDescriptor =
@@ -157,7 +156,7 @@ public class EntitiesDescriptorAssemblerStage extends AbstractStage<Element> {
         // Put a newline between the start and end tags
         ElementSupport.appendTextContent(entitiesDescriptor, "\n");
 
-        final List<Item<Element>> orderedItems = getItemOrderingStrategy().order(itemCollection);
+        final List<Item<Element>> orderedItems = getItemOrderingStrategy().order(items);
         Element descriptor;
         for (final Item<Element> item : orderedItems) {
             descriptor = item.unwrap();
@@ -171,8 +170,8 @@ public class EntitiesDescriptorAssemblerStage extends AbstractStage<Element> {
         }
 
         final Item<Element> item = new DOMElementItem(entitiesDescriptorDocument);
-        itemCollection.clear();
-        itemCollection.add(item);
+        items.clear();
+        items.add(item);
     }
 
     /**
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/EntitiesDescriptorDisassemblerStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/EntitiesDescriptorDisassemblerStage.java
index 2c7b4c1..45657a3 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/EntitiesDescriptorDisassemblerStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/EntitiesDescriptorDisassemblerStage.java
@@ -18,12 +18,15 @@
 package net.shibboleth.metadata.dom.saml;
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.List;
 
 import javax.annotation.Nonnull;
 import javax.annotation.concurrent.ThreadSafe;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Element;
+
 import net.shibboleth.metadata.Item;
 import net.shibboleth.metadata.dom.DOMElementItem;
 import net.shibboleth.metadata.pipeline.AbstractStage;
@@ -31,10 +34,6 @@ import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElemen
 import net.shibboleth.utilities.java.support.xml.ElementSupport;
 import net.shibboleth.utilities.java.support.xml.QNameSupport;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Element;
-
 /**
  * A pipeline stage that replaces any SAML EntitiesDescriptor found in the Item collection with the EntityDescriptor
  * elements contained therein.
@@ -46,19 +45,19 @@ public class EntitiesDescriptorDisassemblerStage extends AbstractStage<Element>
     private final Logger log = LoggerFactory.getLogger(EntitiesDescriptorDisassemblerStage.class);
 
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<Element>> itemCollection) {
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<Element>> items) {
         // make a copy of the input collection and clear it so that we can iterate over
         // the copy and add to the provided collection
-        final ArrayList<Item<Element>> items = new ArrayList<>(itemCollection);
-        itemCollection.clear();
+        final ArrayList<Item<Element>> newItems = new ArrayList<>(items);
+        items.clear();
 
         Element element;
-        for (final Item<Element> item : items) {
+        for (final Item<Element> item : newItems) {
             element = item.unwrap();
             if (SAMLMetadataSupport.isEntitiesDescriptor(element)) {
-                processEntitiesDescriptor(itemCollection, element);
+                processEntitiesDescriptor(items, element);
             } else if (SAMLMetadataSupport.isEntityDescriptor(element)) {
-                processEntityDescriptor(itemCollection, element);
+                processEntityDescriptor(items, element);
             } else {
                 log.debug("{} pipeline stage: DOM Element {} not supported, ignoring it", getId(),
                         QNameSupport.getNodeQName(element));
@@ -70,19 +69,19 @@ public class EntitiesDescriptorDisassemblerStage extends AbstractStage<Element>
      * Processes an EntitiesDescriptor element. All child EntityDescriptor elements are processed and
      * EntitiesDescriptors are run back through this method.
      * 
-     * @param itemCollection collection to which EntityDescriptor metadata elements are added
+     * @param items collection to which EntityDescriptor metadata elements are added
      * @param entitiesDescriptor the EntitiesDescriptor to break down
      */
-    protected void processEntitiesDescriptor(@Nonnull @NonnullElements final Collection<Item<Element>> itemCollection,
+    protected void processEntitiesDescriptor(@Nonnull @NonnullElements final List<Item<Element>> items,
             @Nonnull final Element entitiesDescriptor) {
 
         final List<Element> children = ElementSupport.getChildElements(entitiesDescriptor);
         for (final Element child : children) {
             if (SAMLMetadataSupport.isEntitiesDescriptor(child)) {
-                processEntitiesDescriptor(itemCollection, child);
+                processEntitiesDescriptor(items, child);
             }
             if (SAMLMetadataSupport.isEntityDescriptor(child)) {
-                processEntityDescriptor(itemCollection, child);
+                processEntityDescriptor(items, child);
             }
         }
     }
@@ -91,12 +90,12 @@ public class EntitiesDescriptorDisassemblerStage extends AbstractStage<Element>
      * Processes an EntityDescriptor element. Creates a {@link DOMElementItem} element and adds it to the item
      * collections.
      * 
-     * @param itemCollection collection to which metadata is added
+     * @param items collection to which metadata is added
      * @param entityDescriptor entity descriptor to add to the item collection
      */
-    protected void processEntityDescriptor(@Nonnull @NonnullElements final Collection<Item<Element>> itemCollection,
+    protected void processEntityDescriptor(@Nonnull @NonnullElements final List<Item<Element>> items,
             @Nonnull final Element entityDescriptor) {
         final DOMElementItem item = new DOMElementItem(entityDescriptor);
-        itemCollection.add(item);
+        items.add(item);
     }
-}
\ No newline at end of file
+}
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/mdattr/EntityAttributeAddingStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/mdattr/EntityAttributeAddingStage.java
index 24e846a..259ad21 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/mdattr/EntityAttributeAddingStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/dom/saml/mdattr/EntityAttributeAddingStage.java
@@ -17,7 +17,6 @@
 
 package net.shibboleth.metadata.dom.saml.mdattr;
 
-import java.util.Collection;
 import java.util.List;
 import java.util.function.Predicate;
 
@@ -181,7 +180,7 @@ public class EntityAttributeAddingStage extends AbstractStage<Element> {
     }
 
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<Element>> itemCollection) {
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<Element>> items) {
         final var name = getAttributeName();
         final var format = getAttributeNameFormat();
         final var attributeMatcher = new AttributeElementMatcher(name, format);
@@ -191,7 +190,7 @@ public class EntityAttributeAddingStage extends AbstractStage<Element> {
         final var attributeValueMatcher = new AttributeValueElementMatcher(value);
         final var attributeValueMaker = new AttributeValueElementMaker(value);
 
-        for (final var item : itemCollection) {
+        for (final var item : items) {
             final Element entity = item.unwrap();
     
             if (SAMLMetadataSupport.isEntityDescriptor(entity)) {
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/AbstractFilteringStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/AbstractFilteringStage.java
index 02880ca..aab86f8 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/AbstractFilteringStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/AbstractFilteringStage.java
@@ -17,8 +17,8 @@
 
 package net.shibboleth.metadata.pipeline;
 
-import java.util.Collection;
 import java.util.Iterator;
+import java.util.List;
 
 import javax.annotation.Nonnull;
 import javax.annotation.concurrent.ThreadSafe;
@@ -47,9 +47,9 @@ public abstract class AbstractFilteringStage<T> extends AbstractStage<T> {
      * {@inheritDoc}
      */
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<T>> itemCollection)
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<T>> items)
             throws StageProcessingException {
-        final Iterator<Item<T>> itemIterator = itemCollection.iterator();
+        final Iterator<Item<T>> itemIterator = items.iterator();
 
         while (itemIterator.hasNext()) {
             final Item<T> item = itemIterator.next();
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/AbstractItemMetadataSelectionStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/AbstractItemMetadataSelectionStage.java
index 7a55bd6..489e933 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/AbstractItemMetadataSelectionStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/AbstractItemMetadataSelectionStage.java
@@ -100,10 +100,10 @@ public abstract class AbstractItemMetadataSelectionStage<T> extends AbstractStag
     }
 
     @Override
-    protected void doExecute(final Collection<Item<T>> itemCollection) throws StageProcessingException {
+    protected void doExecute(final List<Item<T>> items) throws StageProcessingException {
         // we make a defensive copy here in case logic in the delegate #doExecute makes changes
-        // to the itemCollection and thus would cause issues if we were iterating over it directly
-        final ArrayList<Item<T>> collectionCopy = new ArrayList<>(itemCollection);
+        // to the item collection and thus would cause issues if we were iterating over it directly
+        final var collectionCopy = new ArrayList<>(items);
 
         for (final Item<T> item : collectionCopy) {
             final HashMap<Class<? extends ItemMetadata>, List<? extends ItemMetadata>> matchingMetadata =
@@ -116,7 +116,7 @@ public abstract class AbstractItemMetadataSelectionStage<T> extends AbstractStag
             }
 
             if (!matchingMetadata.isEmpty()) {
-                doExecute(itemCollection, item, matchingMetadata);
+                doExecute(items, item, matchingMetadata);
             }
         }
     }
@@ -132,14 +132,14 @@ public abstract class AbstractItemMetadataSelectionStage<T> extends AbstractStag
     /**
      * Performs the stage's logic on the given item that contained metadata of the given type.
      * 
-     * @param itemCollection current item collection
+     * @param items current item collection
      * @param matchingItem matching item
      * @param matchingMetadata all the {@link ItemMetadata} instances that match a selection criteria
      * 
      * @throws StageProcessingException thrown if there is a problem processing the item
      */
     protected abstract void doExecute(
-            @Nonnull @NonnullElements final Collection<Item<T>> itemCollection,
+            @Nonnull @NonnullElements final List<Item<T>> items,
             @Nonnull final Item<T> matchingItem,
             @Nonnull @NonnullElements
             final Map<Class<? extends ItemMetadata>, List<? extends ItemMetadata>> matchingMetadata)
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/AbstractIteratingStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/AbstractIteratingStage.java
index da27229..dba4b2b 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/AbstractIteratingStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/AbstractIteratingStage.java
@@ -17,7 +17,7 @@
 
 package net.shibboleth.metadata.pipeline;
 
-import java.util.Collection;
+import java.util.List;
 
 import javax.annotation.Nonnull;
 import javax.annotation.concurrent.ThreadSafe;
@@ -42,9 +42,9 @@ public abstract class AbstractIteratingStage<T> extends AbstractStage<T> {
      * {@inheritDoc}
      */
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<T>> itemCollection)
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<T>> items)
             throws StageProcessingException {
-        for (final Item<T> item : itemCollection) {
+        for (final Item<T> item : items) {
             doExecute(item);
         }
     }
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/AbstractStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/AbstractStage.java
index 5393f62..fb2c349 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/AbstractStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/AbstractStage.java
@@ -19,6 +19,7 @@ package net.shibboleth.metadata.pipeline;
 
 import java.time.Instant;
 import java.util.Collection;
+import java.util.List;
 import java.util.function.Predicate;
 
 import javax.annotation.Nonnull;
@@ -70,18 +71,18 @@ public abstract class AbstractStage<T> extends BaseIdentifiableInitializableComp
     }
 
     @Override
-    public void execute(@Nonnull @NonnullElements final Collection<Item<T>> itemCollection)
+    public void execute(@Nonnull @NonnullElements final List<Item<T>> items)
             throws StageProcessingException {
         throwComponentStateExceptions();
 
         final var start = Instant.now();
 
-        if (getCollectionPredicate().test(itemCollection)) {
-            doExecute(itemCollection);
+        if (getCollectionPredicate().test(items)) {
+            doExecute(items);
         }
 
         final var componentInfo = new ComponentInfo(getId(), getClass(), start, Instant.now());
-        for (final var item : itemCollection) {
+        for (final var item : items) {
             item.getItemMetadata().put(componentInfo);
         }
     }
@@ -93,11 +94,11 @@ public abstract class AbstractStage<T> extends BaseIdentifiableInitializableComp
      * The stage is guaranteed to be have been initialized and not destroyed when this is invoked.
      * </p>
      * 
-     * @param itemCollection collection to be processed
+     * @param items collection to be processed
      * 
      * @throws StageProcessingException thrown if there is an unrecoverable problem when processing the stage
      */
-    protected abstract void doExecute(@Nonnull @NonnullElements final Collection<Item<T>> itemCollection)
+    protected abstract void doExecute(@Nonnull @NonnullElements final List<Item<T>> items)
             throws StageProcessingException;
 
 }
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/CompositeStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/CompositeStage.java
index 18991b4..dba6248 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/CompositeStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/CompositeStage.java
@@ -17,7 +17,6 @@
 
 package net.shibboleth.metadata.pipeline;
 
-import java.util.Collection;
 import java.util.List;
 
 import javax.annotation.Nonnull;
@@ -64,10 +63,10 @@ public class CompositeStage<T> extends AbstractStage<T> {
     }
 
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<T>> itemCollection)
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<T>> items)
             throws StageProcessingException {
         for (final Stage<T> stage : getComposedStages()) {
-            stage.execute(itemCollection);
+            stage.execute(items);
         }
     }
 
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/FutureSupport.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/FutureSupport.java
index d2bd558..44b8048 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/FutureSupport.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/FutureSupport.java
@@ -17,7 +17,7 @@
 
 package net.shibboleth.metadata.pipeline;
 
-import java.util.Collection;
+import java.util.List;
 import java.util.concurrent.ExecutionException;
 import java.util.concurrent.Future;
 import java.util.concurrent.TimeUnit;
@@ -118,11 +118,11 @@ public final class FutureSupport {
      * 
      * @throws StageProcessingException unless resolution is successful
      */
-    @Nonnull public static <T> Collection<Item<T>> futureItems(
-            @Nonnull final Future<Collection<Item<T>>> future) throws StageProcessingException {
+    @Nonnull public static <T> List<Item<T>> futureItems(
+            @Nonnull final Future<List<Item<T>>> future) throws StageProcessingException {
         assert future != null;
         try {
-            final Collection<Item<T>> value = future.get();
+            final List<Item<T>> value = future.get();
             if (value == null) {
                 throw new StageProcessingException("null returned from future value");
             }
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ItemMetadataFilterStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ItemMetadataFilterStage.java
index cf7607e..66ac26a 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ItemMetadataFilterStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ItemMetadataFilterStage.java
@@ -17,20 +17,19 @@
 
 package net.shibboleth.metadata.pipeline;
 
-import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 
 import javax.annotation.Nonnull;
 import javax.annotation.concurrent.ThreadSafe;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import net.shibboleth.metadata.Item;
 import net.shibboleth.metadata.ItemMetadata;
 import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 /**
  * A {@link Stage} that filters out {@link Item} if they have a specific type of {@link ItemMetadata} attached to them.
  * 
@@ -46,7 +45,7 @@ public class ItemMetadataFilterStage<T> extends AbstractItemMetadataSelectionSta
     private final Logger log = LoggerFactory.getLogger(ItemMetadataFilterStage.class);
 
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<T>> itemCollection,
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<T>> items,
             final Item<T> matchingItem,
             final Map<Class<? extends ItemMetadata>, List<? extends ItemMetadata>> matchingMetadata)
             throws StageProcessingException {
@@ -54,6 +53,6 @@ public class ItemMetadataFilterStage<T> extends AbstractItemMetadataSelectionSta
         final String itemId = getItemIdentificationStrategy().getItemIdentifier(matchingItem);
         log.debug("Item {} was removed because it was marked with {}", itemId, matchingMetadata.keySet());
 
-        itemCollection.remove(matchingItem);
+        items.remove(matchingItem);
     }
 }
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ItemMetadataTerminationStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ItemMetadataTerminationStage.java
index 04fe865..a157d4d 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ItemMetadataTerminationStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ItemMetadataTerminationStage.java
@@ -17,20 +17,19 @@
 
 package net.shibboleth.metadata.pipeline;
 
-import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 
 import javax.annotation.Nonnull;
 import javax.annotation.concurrent.ThreadSafe;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import net.shibboleth.metadata.Item;
 import net.shibboleth.metadata.ItemMetadata;
 import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 /**
  * A {@link Stage} that terminates pipeline processing if an {@link Item} has a specific type of {@link ItemMetadata}
  * attached to it.
@@ -44,7 +43,7 @@ public class ItemMetadataTerminationStage<T> extends AbstractItemMetadataSelecti
     private final Logger log = LoggerFactory.getLogger(ItemMetadataTerminationStage.class);
 
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<T>> itemCollection,
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<T>> items,
             final Item<T> matchingItem,
             final Map<Class<? extends ItemMetadata>, List<? extends ItemMetadata>> matchingMetadata)
             throws TerminationException {
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ItemOrderingStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ItemOrderingStage.java
index d30b0c2..230adb6 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ItemOrderingStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ItemOrderingStage.java
@@ -17,7 +17,7 @@
 
 package net.shibboleth.metadata.pipeline;
 
-import java.util.Collection;
+import java.util.List;
 
 import javax.annotation.Nonnull;
 import javax.annotation.concurrent.GuardedBy;
@@ -63,11 +63,11 @@ public class ItemOrderingStage<T> extends AbstractStage<T> {
     }
 
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<T>> itemCollection)
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<T>> items)
             throws StageProcessingException {
-        final var orderedItems = getItemOrderingStrategy().order(itemCollection);
-        itemCollection.clear();
-        itemCollection.addAll(orderedItems);
+        final var orderedItems = getItemOrderingStrategy().order(items);
+        items.clear();
+        items.addAll(orderedItems);
     }
 
     @Override
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ItemOrderingStrategy.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ItemOrderingStrategy.java
index 81c409c..f04be70 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ItemOrderingStrategy.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ItemOrderingStrategy.java
@@ -17,7 +17,6 @@
 
 package net.shibboleth.metadata.pipeline;
 
-import java.util.Collection;
 import java.util.List;
 
 import javax.annotation.Nonnull;
@@ -52,7 +51,7 @@ public interface ItemOrderingStrategy<T> {
      *      because they do not meet required pre-conditions
      */
     @Nonnull @NonnullElements @Unmodifiable
-    List<Item<T>> order(@Nonnull @NonnullElements @Unmodifiable final Collection<Item<T>> items)
+    List<Item<T>> order(@Nonnull @NonnullElements @Unmodifiable final List<Item<T>> items)
         throws StageProcessingException;
 
 }
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/Pipeline.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/Pipeline.java
index 7e10c34..55da845 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/Pipeline.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/Pipeline.java
@@ -17,7 +17,6 @@
 
 package net.shibboleth.metadata.pipeline;
 
-import java.util.Collection;
 import java.util.List;
 
 import javax.annotation.Nonnull;
@@ -62,10 +61,10 @@ public interface Pipeline<T> extends DestructableComponent, IdentifiedComponent,
     /**
      * Executes each registered {@link Stage} in turn.
      * 
-     * @param itemCollection the collection that will hold the Item as it passes from stage to stage
+     * @param items the collection that will hold the {@link Item}s as they pass from stage to stage
      * 
      * @throws PipelineProcessingException thrown if there is a problem processing the pipeline
      */
-    void execute(@Nonnull @NonnullElements final Collection<Item<T>> itemCollection)
+    void execute(@Nonnull @NonnullElements final List<Item<T>> items)
             throws PipelineProcessingException;
 }
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/PipelineCallable.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/PipelineCallable.java
index a8539c1..ce415ad 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/PipelineCallable.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/PipelineCallable.java
@@ -17,54 +17,54 @@
 
 package net.shibboleth.metadata.pipeline;
 
-import java.util.Collection;
+import java.util.List;
 import java.util.concurrent.Callable;
 
 import javax.annotation.Nonnull;
 import javax.annotation.concurrent.Immutable;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import net.shibboleth.metadata.Item;
 import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
 import net.shibboleth.utilities.java.support.logic.Constraint;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 /**
  * A {@link Callable} that executes a {@link Pipeline} and returns the given item collection.
  * 
  * @param <T> type of the items processed by the pipeline
  */
 @Immutable
-public class PipelineCallable<T> implements Callable<Collection<Item<T>>> {
+public class PipelineCallable<T> implements Callable<List<Item<T>>> {
 
     /** Class logger. */
     private final Logger log = LoggerFactory.getLogger(PipelineCallable.class);
 
     /** The pipeline to be executed, never null. */
-    private Pipeline<T> pipeline;
+    private final Pipeline<T> thePipeline;
 
     /** The collection of items upon which the pipeline will operate. */
-    private Collection<Item<T>> itemCollection;
+    private final List<Item<T>> theItems;
 
     /**
      * Constructor.
      * 
-     * @param invokedPipeline the pipeline that will be invoked; must be initialized; can not be null
+     * @param pipeline the pipeline that will be invoked; must be initialized; can not be null
      * @param items the collection of items upon which the pipeline will operate, can not be null
      */
-    public PipelineCallable(@Nonnull final Pipeline<T> invokedPipeline,
-            @Nonnull @NonnullElements final Collection<Item<T>> items) {
-        pipeline = Constraint.isNotNull(invokedPipeline, "To-be-invoked pipeline can not be null");
-        Constraint.isTrue(invokedPipeline.isInitialized(), "To-be-invoked pipeline must be initialized");
+    public PipelineCallable(@Nonnull final Pipeline<T> pipeline,
+            @Nonnull @NonnullElements final List<Item<T>> items) {
+        thePipeline = Constraint.isNotNull(pipeline, "To-be-invoked pipeline can not be null");
+        Constraint.isTrue(pipeline.isInitialized(), "To-be-invoked pipeline must be initialized");
 
-        itemCollection = Constraint.isNotNull(items, "Item collection can not be null");
+        theItems = Constraint.isNotNull(items, "Item collection can not be null");
     }
 
-    @Override @Nonnull @NonnullElements public Collection<Item<T>> call() throws PipelineProcessingException {
-        log.debug("Executing pipeline {} on an item collection containing {} items", pipeline.getId(),
-                itemCollection.size());
-        pipeline.execute(itemCollection);
-        return itemCollection;
+    @Override @Nonnull @NonnullElements public List<Item<T>> call() throws PipelineProcessingException {
+        log.debug("Executing pipeline {} on an item collection containing {} items", thePipeline.getId(),
+                theItems.size());
+        thePipeline.execute(theItems);
+        return theItems;
     }
 }
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/PipelineDemultiplexerStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/PipelineDemultiplexerStage.java
index 618bf4b..7a08860 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/PipelineDemultiplexerStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/PipelineDemultiplexerStage.java
@@ -18,7 +18,6 @@
 package net.shibboleth.metadata.pipeline;
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.List;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -74,7 +73,7 @@ public class PipelineDemultiplexerStage<T> extends AbstractStage<T> {
 
     /** Factory used to create the Item collection that is then given to the pipelines. */
     @Nonnull @GuardedBy("this")
-    private Supplier<Collection<Item<T>>> collectionFactory = new SimpleItemCollectionFactory<>();
+    private Supplier<List<Item<T>>> collectionFactory = new SimpleItemCollectionFactory<>();
 
     /** The pipelines through which items are sent and the selection strategy used for that pipeline. */
     @Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
@@ -123,7 +122,7 @@ public class PipelineDemultiplexerStage<T> extends AbstractStage<T> {
      * 
      * @return factory used to create the Item collection that is then given to the pipelines
      */
-    @Nonnull public final synchronized Supplier<Collection<Item<T>>> getCollectionFactory() {
+    @Nonnull public final synchronized Supplier<List<Item<T>>> getCollectionFactory() {
         return collectionFactory;
     }
 
@@ -132,7 +131,7 @@ public class PipelineDemultiplexerStage<T> extends AbstractStage<T> {
      * 
      * @param factory factory used to create the Item collection that is then given to the pipelines
      */
-    public synchronized void setCollectionFactory(@Nonnull final Supplier<Collection<Item<T>>> factory) {
+    public synchronized void setCollectionFactory(@Nonnull final Supplier<List<Item<T>>> factory) {
         throwSetterPreconditionExceptions();
         collectionFactory = Constraint.isNotNull(factory, "Collection factory can not be null");
     }
@@ -165,16 +164,16 @@ public class PipelineDemultiplexerStage<T> extends AbstractStage<T> {
     }
 
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<T>> itemCollection)
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<T>> items)
             throws StageProcessingException {
-        final ArrayList<Future<Collection<Item<T>>>> pipelineFutures = new ArrayList<>();
+        final ArrayList<Future<List<Item<T>>>> pipelineFutures = new ArrayList<>();
 
         for (final Pair<Pipeline<T>, Predicate<Item<T>>> pipelineAndStrategy : getPipelineAndSelectionStrategies()) {
             final Pipeline<T> pipeline = pipelineAndStrategy.getFirst();
             final Predicate<Item<T>> selectionStrategy = pipelineAndStrategy.getSecond();
-            final Collection<Item<T>> selectedItems = getCollectionFactory().get();
+            final List<Item<T>> selectedItems = getCollectionFactory().get();
 
-            for (final Item<T> item : itemCollection) {
+            for (final Item<T> item : items) {
                 if (selectionStrategy.test(item)) {
 //                    @SuppressWarnings("unchecked") final ItemType copied = (ItemType) item.copy();
 //                    selectedItems.add(copied);
@@ -186,7 +185,7 @@ public class PipelineDemultiplexerStage<T> extends AbstractStage<T> {
         }
 
         if (isWaitingForPipelines()) {
-            for (final Future<Collection<Item<T>>> pipelineFuture : pipelineFutures) {
+            for (final Future<List<Item<T>>> pipelineFuture : pipelineFutures) {
                 FutureSupport.futureItems(pipelineFuture);
             }
         }
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/PipelineMergeStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/PipelineMergeStage.java
index b49fede..04e63d1 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/PipelineMergeStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/PipelineMergeStage.java
@@ -18,7 +18,6 @@
 package net.shibboleth.metadata.pipeline;
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.List;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
@@ -39,10 +38,10 @@ import net.shibboleth.utilities.java.support.component.ComponentInitializationEx
 import net.shibboleth.utilities.java.support.logic.Constraint;
 
 /**
- * This {@link Stage} allows the merging of multiple pipeline outputs into a single {@link Collection} that can then be
+ * This {@link Stage} allows the merging of multiple pipeline outputs into a single {@link List} that can then be
  * used as the input source for another pipeline.
  * 
- * This source works producing a {@link Collection} by means of the registered {@link Supplier} . Then each of its
+ * This source works producing a {@link List} by means of the registered {@link Supplier} . Then each of its
  * registered {@link Pipeline} is invoked in turn (no ordering is guaranteed and pipelines may execute concurrently).
  * After each pipeline has completed the results are merged in to the Item collection given to this stage by means of
  * the an {@link CollectionMergeStrategy}.
@@ -61,7 +60,7 @@ public class PipelineMergeStage<T> extends AbstractStage<T> {
      * {@link SimpleItemCollectionFactory}.
      */
     @Nonnull @GuardedBy("this")
-    private Supplier<Collection<Item<T>>> collectionFactory = new SimpleItemCollectionFactory<>();
+    private Supplier<List<Item<T>>> collectionFactory = new SimpleItemCollectionFactory<>();
 
     /** Strategy used to merge all the joined pipeline results in to the final Item collection. */
     @Nonnull @GuardedBy("this")
@@ -116,7 +115,7 @@ public class PipelineMergeStage<T> extends AbstractStage<T> {
      * 
      * @return factory used to create the {@link Item} collection produced by this source
      */
-    @Nonnull public final synchronized Supplier<Collection<Item<T>>> getCollectionFactory() {
+    @Nonnull public final synchronized Supplier<List<Item<T>>> getCollectionFactory() {
         return collectionFactory;
     }
 
@@ -125,7 +124,7 @@ public class PipelineMergeStage<T> extends AbstractStage<T> {
      * 
      * @param factory factory used to create the {@link Item} collection produced by this source
      */
-    public synchronized void setCollectionFactory(@Nonnull final Supplier<Collection<Item<T>>> factory) {
+    public synchronized void setCollectionFactory(@Nonnull final Supplier<List<Item<T>>> factory) {
         throwSetterPreconditionExceptions();
         collectionFactory = Constraint.isNotNull(factory, "Collection factory may not be null");
     }
@@ -151,21 +150,21 @@ public class PipelineMergeStage<T> extends AbstractStage<T> {
     }
 
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<T>> itemCollection)
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<T>> items)
             throws StageProcessingException {
-        final ArrayList<Future<Collection<Item<T>>>> pipelineResultFutures = new ArrayList<>();
+        final ArrayList<Future<List<Item<T>>>> pipelineResultFutures = new ArrayList<>();
 
         for (final Pipeline<T> pipeline : getMergedPipelines()) {
             pipelineResultFutures.add(getExecutorService().submit(
                     new PipelineCallable<>(pipeline, getCollectionFactory().get())));
         }
 
-        final ArrayList<Collection<Item<T>>> pipelineResults = new ArrayList<>();
-        for (final Future<Collection<Item<T>>> future : pipelineResultFutures) {
+        final ArrayList<List<Item<T>>> pipelineResults = new ArrayList<>();
+        for (final Future<List<Item<T>>> future : pipelineResultFutures) {
             pipelineResults.add(FutureSupport.futureItems(future));
         }
 
-        getCollectionMergeStrategy().mergeCollection(itemCollection, pipelineResults);
+        getCollectionMergeStrategy().merge(items, pipelineResults);
     }
 
     @Override
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ScriptletStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ScriptletStage.java
index ac9500e..c2acf46 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ScriptletStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/ScriptletStage.java
@@ -17,7 +17,7 @@
 
 package net.shibboleth.metadata.pipeline;
 
-import java.util.Collection;
+import java.util.List;
 
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
@@ -85,10 +85,10 @@ public class ScriptletStage<T> extends AbstractStage<T> {
     }
 
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<T>> itemCollection)
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<T>> items)
             throws StageProcessingException {
         final SimpleScriptContext context = new SimpleScriptContext();
-        context.setAttribute(ITEMS, itemCollection, SimpleScriptContext.ENGINE_SCOPE);
+        context.setAttribute(ITEMS, items, SimpleScriptContext.ENGINE_SCOPE);
 
         try {
             getScript().eval(context);
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/SerializationStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/SerializationStage.java
index e693073..109b19f 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/SerializationStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/SerializationStage.java
@@ -21,7 +21,7 @@ import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
-import java.util.Collection;
+import java.util.List;
 
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
@@ -126,10 +126,10 @@ public class SerializationStage<T> extends AbstractStage<T> {
     }
 
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<T>> itemCollection)
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<T>> items)
             throws StageProcessingException {
         try (OutputStream stream = new FileOutputStream(getOutputFile())) {
-            getSerializer().serializeCollection(itemCollection, stream);
+            getSerializer().serializeCollection(items, stream);
         } catch (final IOException e) {
             throw new StageProcessingException("Error writing to output file " +
                     getOutputFile().getAbsolutePath(), e);
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/SimplePipeline.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/SimplePipeline.java
index 9ff5456..684786b 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/SimplePipeline.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/SimplePipeline.java
@@ -18,7 +18,6 @@
 package net.shibboleth.metadata.pipeline;
 
 import java.time.Instant;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
@@ -63,17 +62,17 @@ public class SimplePipeline<T> extends BaseIdentifiableInitializableComponent
     }
 
     @Override
-    public void execute(@Nonnull @NonnullElements final Collection<Item<T>> itemCollection)
+    public void execute(@Nonnull @NonnullElements final List<Item<T>> items)
             throws PipelineProcessingException {
 
         final var start = Instant.now();
 
         for (final Stage<T> stage : pipelineStages) {
-            stage.execute(itemCollection);
+            stage.execute(items);
         }
 
         final var componentInfo = new ComponentInfo(getId(), getClass(), start, Instant.now());
-        for (final var item : itemCollection) {
+        for (final var item : items) {
             item.getItemMetadata().put(componentInfo);
         }
     }
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/SplitMergeStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/SplitMergeStage.java
index 0752cb9..97c0776 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/SplitMergeStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/SplitMergeStage.java
@@ -18,7 +18,7 @@
 package net.shibboleth.metadata.pipeline;
 
 import java.util.ArrayList;
-import java.util.Collection;
+import java.util.List;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.Future;
@@ -75,7 +75,7 @@ public class SplitMergeStage<T> extends AbstractStage<T> {
 
     /** Factory used to create the Item collection that is then given to the pipelines. */
     @Nonnull @GuardedBy("this")
-    private Supplier<Collection<Item<T>>> collectionFactory = new SimpleItemCollectionFactory<>();
+    private Supplier<List<Item<T>>> collectionFactory = new SimpleItemCollectionFactory<>();
 
     /** Strategy used to split the given item collection. */
     @Nonnull @GuardedBy("this")
@@ -117,7 +117,7 @@ public class SplitMergeStage<T> extends AbstractStage<T> {
      * 
      * @return factory used to create the Item collection that is then given to the pipelines
      */
-    @Nonnull public final synchronized Supplier<Collection<Item<T>>> getCollectionFactory() {
+    @Nonnull public final synchronized Supplier<List<Item<T>>> getCollectionFactory() {
         return collectionFactory;
     }
 
@@ -126,7 +126,7 @@ public class SplitMergeStage<T> extends AbstractStage<T> {
      * 
      * @param factory factory used to create the Item collection that is then given to the pipelines
      */
-    public synchronized void setCollectionFactory(@Nonnull final Supplier<Collection<Item<T>>> factory) {
+    public synchronized void setCollectionFactory(@Nonnull final Supplier<List<Item<T>>> factory) {
         throwSetterPreconditionExceptions();
         collectionFactory = Constraint.isNotNull(factory, "Collection factory can not be null");
     }
@@ -209,13 +209,13 @@ public class SplitMergeStage<T> extends AbstractStage<T> {
     }
 
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<T>> itemCollection)
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<T>> items)
             throws StageProcessingException {
-        final Collection<Item<T>> selectedItems = getCollectionFactory().get();
-        final Collection<Item<T>> nonselectedItems = getCollectionFactory().get();
+        final List<Item<T>> selectedItems = getCollectionFactory().get();
+        final List<Item<T>> nonselectedItems = getCollectionFactory().get();
 
         final var strategy = getSelectionStrategy();
-        for (final Item<T> item : itemCollection) {
+        for (final Item<T> item : items) {
             if (strategy.test(item)) {
                 selectedItems.add(item);
             } else {
@@ -223,19 +223,19 @@ public class SplitMergeStage<T> extends AbstractStage<T> {
             }
         }
 
-        final Future<Collection<Item<T>>> selectedItemFuture =
+        final Future<List<Item<T>>> selectedItemFuture =
                 executePipeline(getSelectedItemPipeline(), selectedItems);
-        final Future<Collection<Item<T>>> nonselectedItemFuture =
+        final Future<List<Item<T>>> nonselectedItemFuture =
                 executePipeline(getNonselectedItemPipeline(), nonselectedItems);
 
-        final ArrayList<Collection<Item<T>>> pipelineResults = new ArrayList<>();
+        final List<List<Item<T>>> pipelineResults = new ArrayList<>();
         
         // resolve results from the pipelines
         pipelineResults.add(FutureSupport.futureItems(selectedItemFuture));
         pipelineResults.add(FutureSupport.futureItems(nonselectedItemFuture));
 
-        itemCollection.clear();
-        getCollectionMergeStrategy().mergeCollection(itemCollection, pipelineResults);
+        items.clear();
+        getCollectionMergeStrategy().merge(items, pipelineResults);
     }
 
     /**
@@ -246,8 +246,8 @@ public class SplitMergeStage<T> extends AbstractStage<T> {
      * 
      * @return the token representing the background execution of the pipeline
      */
-    @Nonnull protected Future<Collection<Item<T>>> executePipeline(final Pipeline<T> pipeline,
-            final Collection<Item<T>> items) {
+    @Nonnull protected Future<List<Item<T>>> executePipeline(final Pipeline<T> pipeline,
+            final List<Item<T>> items) {
 
         /*
          * If no pipeline has been specified, just return the collection unchanged via
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/Stage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/Stage.java
index b85df67..93c163e 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/Stage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/Stage.java
@@ -17,7 +17,7 @@
 
 package net.shibboleth.metadata.pipeline;
 
-import java.util.Collection;
+import java.util.List;
 
 import javax.annotation.Nonnull;
 import javax.annotation.concurrent.ThreadSafe;
@@ -44,10 +44,10 @@ public interface Stage<T> extends DestructableComponent, IdentifiedComponent,
     /**
      * Transforms the given input data.
      * 
-     * @param itemCollection the data to be transformed
+     * @param items the data to be transformed
      * 
      * @throws StageProcessingException thrown if there is a problem running this stage on the given input
      */
-    void execute(@Nonnull @NonnullElements final Collection<Item<T>> itemCollection)
+    void execute(@Nonnull @NonnullElements final List<Item<T>> items)
             throws StageProcessingException;
 }
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/StaticItemSourceStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/StaticItemSourceStage.java
index 140e33d..c990d78 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/StaticItemSourceStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/StaticItemSourceStage.java
@@ -17,7 +17,6 @@
 
 package net.shibboleth.metadata.pipeline;
 
-import java.util.Collection;
 import java.util.List;
 
 import javax.annotation.Nonnull;
@@ -36,7 +35,7 @@ import net.shibboleth.utilities.java.support.annotation.constraint.Unmodifiable;
 @ThreadSafe
 public class StaticItemSourceStage<T> extends AbstractStage<T> {
 
-    /** Collection of static Items added to each Item collection by {@link #execute(Collection)}. */
+    /** Collection of static Items added to each Item collection by {@link #execute(List)}. */
     @Nonnull @NonnullElements @Unmodifiable @GuardedBy("this")
     private List<Item<T>> source = List.of();
 
@@ -46,7 +45,7 @@ public class StaticItemSourceStage<T> extends AbstractStage<T> {
      * @return collection of static Items added to the Item collection by this stage
      */
     @Nonnull @NonnullElements @Unmodifiable
-    public final synchronized Collection<Item<T>> getSourceItems() {
+    public final synchronized List<Item<T>> getSourceItems() {
         return source;
     }
 
@@ -56,18 +55,16 @@ public class StaticItemSourceStage<T> extends AbstractStage<T> {
      * @param items collection of Items added to the Item collection by this stage
      */
     public synchronized void setSourceItems(
-            @Nonnull @NonnullElements @Unmodifiable final Collection<Item<T>> items) {
+            @Nonnull @NonnullElements @Unmodifiable final List<Item<T>> items) {
         throwSetterPreconditionExceptions();
         source = List.copyOf(items);
     }
 
     @Override
-    protected void doExecute(@Nonnull @NonnullElements final Collection<Item<T>> itemCollection)
+    protected void doExecute(@Nonnull @NonnullElements final List<Item<T>> items)
             throws StageProcessingException {
         for (final Item<T> item : getSourceItems()) {
-            if (item != null) {
-                itemCollection.add(item.copy());
-            }
+            items.add(item.copy());
         }
     }
 
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/StatusMetadataLoggingStage.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/StatusMetadataLoggingStage.java
index b158452..c7bae52 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/StatusMetadataLoggingStage.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/StatusMetadataLoggingStage.java
@@ -17,13 +17,15 @@
 
 package net.shibboleth.metadata.pipeline;
 
-import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 
 import javax.annotation.Nonnull;
 import javax.annotation.concurrent.ThreadSafe;
 
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 import net.shibboleth.metadata.ErrorStatus;
 import net.shibboleth.metadata.InfoStatus;
 import net.shibboleth.metadata.Item;
@@ -32,9 +34,6 @@ import net.shibboleth.metadata.StatusMetadata;
 import net.shibboleth.metadata.WarningStatus;
 import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
 /**
  * A {@link Stage} that logs {@link StatusMetadata} associated with an {@link Item}.
  * 
@@ -48,7 +47,7 @@ public class StatusMetadataLoggingStage<T> extends AbstractItemMetadataSelection
 
     @Override
     protected void doExecute(
-            @Nonnull @NonnullElements final Collection<Item<T>> itemCollection,
+            @Nonnull @NonnullElements final List<Item<T>> items,
             @Nonnull final Item<T> matchingItem,
             @Nonnull @NonnullElements final Map<Class<? extends ItemMetadata>,
             List<? extends ItemMetadata>> matchingMetadata)
diff --git a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/impl/NoOpItemOrderingStrategy.java b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/impl/NoOpItemOrderingStrategy.java
index 7f667b3..4d24a53 100644
--- a/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/impl/NoOpItemOrderingStrategy.java
+++ b/aggregator-pipeline/src/main/java/net/shibboleth/metadata/pipeline/impl/NoOpItemOrderingStrategy.java
@@ -17,7 +17,6 @@
 
 package net.shibboleth.metadata.pipeline.impl;
 
-import java.util.Collection;
 import java.util.List;
 
 import javax.annotation.Nonnull;
@@ -40,7 +39,7 @@ public class NoOpItemOrderingStrategy<T> implements ItemOrderingStrategy<T> {
 
     @Override
     @Nonnull @NonnullElements @Unmodifiable
-    public List<Item<T>> order(@Nonnull @NonnullElements @Unmodifiable final Collection<Item<T>> items) {
+    public List<Item<T>> order(@Nonnull @NonnullElements @Unmodifiable final List<Item<T>> items) {
         return List.copyOf(items);
     }
 
diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/CRDetectionStageTest.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/CRDetectionStageTest.java
index 8fd1c70..6a2f992 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/CRDetectionStageTest.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/CRDetectionStageTest.java
@@ -79,12 +79,12 @@ public class CRDetectionStageTest extends BaseDOMTest {
     }
 
     private List<ErrorStatus> execute(final Item<Element> item) throws Exception {
-        final List<Item<Element>> itemCollection = new ArrayList<>();
-        itemCollection.add(item);
+        final List<Item<Element>> items = new ArrayList<>();
+        items.add(item);
         final CRDetectionStage stage = new CRDetectionStage();
         stage.setId("test");
         stage.initialize();
-        stage.execute(itemCollection);
+        stage.execute(items);
         final List<WarningStatus> warnings = item.getItemMetadata().get(WarningStatus.class);
         Assert.assertTrue(warnings.isEmpty());
         final List<InfoStatus> infos = item.getItemMetadata().get(InfoStatus.class);
diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/XMLSchemaValidationStageTest.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/XMLSchemaValidationStageTest.java
index c4b38a1..684cb9c 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/XMLSchemaValidationStageTest.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/XMLSchemaValidationStageTest.java
@@ -18,17 +18,16 @@
 package net.shibboleth.metadata.dom;
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.List;
 
-import net.shibboleth.metadata.ErrorStatus;
-import net.shibboleth.metadata.Item;
-
 import org.springframework.core.io.Resource;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 import org.w3c.dom.Element;
 
+import net.shibboleth.metadata.ErrorStatus;
+import net.shibboleth.metadata.Item;
+
 public class XMLSchemaValidationStageTest extends BaseDOMTest {
 
     /** Constructor sets class under test. */
@@ -40,7 +39,7 @@ public class XMLSchemaValidationStageTest extends BaseDOMTest {
     public void testValidXml() throws Exception {
         XMLSchemaValidationStage stage = buildStage();
 
-        Collection<Item<Element>> mdCol = buildMetdataCollection("valid.xml");
+        List<Item<Element>> mdCol = buildMetdataCollection("valid.xml");
         stage.execute(mdCol);
         Assert.assertEquals(mdCol.size(), 1);
         Assert.assertFalse(mdCol.iterator().next().getItemMetadata().containsKey(ErrorStatus.class));
@@ -49,7 +48,7 @@ public class XMLSchemaValidationStageTest extends BaseDOMTest {
     @Test
     public void testInvalidXml() throws Exception {
         XMLSchemaValidationStage stage = buildStage();
-        Collection<Item<Element>> mdCol = buildMetdataCollection("invalid.xml");
+        List<Item<Element>> mdCol = buildMetdataCollection("invalid.xml");
         stage.execute(mdCol);
         Assert.assertEquals(mdCol.size(), 1);
         Assert.assertTrue(mdCol.iterator().next().getItemMetadata().containsKey(ErrorStatus.class));
@@ -67,7 +66,7 @@ public class XMLSchemaValidationStageTest extends BaseDOMTest {
         return stage;
     }
 
-    protected Collection<Item<Element>> buildMetdataCollection(String xmlPath) throws Exception {
+    protected List<Item<Element>> buildMetdataCollection(String xmlPath) throws Exception {
         final Element element = readXMLData(xmlPath);
         final List<Item<Element>> mdCol = new ArrayList<>();
         mdCol.add(new DOMElementItem(element));
diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/ContactPersonFilterStageTest.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/ContactPersonFilterStageTest.java
index f2df428..f52d696 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/ContactPersonFilterStageTest.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/ContactPersonFilterStageTest.java
@@ -130,12 +130,12 @@ public class ContactPersonFilterStageTest extends BaseDOMTest {
         stage.setId("foo");
         stage.initialize();
 
-        final ArrayList<Item<Element>> itemCollection = new ArrayList<>();
-        itemCollection.add(new DOMElementItem(entitiesDescriptor));
+        final ArrayList<Item<Element>> items = new ArrayList<>();
+        items.add(new DOMElementItem(entitiesDescriptor));
 
-        stage.execute(itemCollection);
+        stage.execute(items);
 
-        Element filteredEntitiesDescriptor = itemCollection.get(0).unwrap();
+        Element filteredEntitiesDescriptor = items.get(0).unwrap();
         List<Element> entityDescriptors = ElementSupport.getChildElements(filteredEntitiesDescriptor);
         
         Element idpDescriptor = entityDescriptors.get(0);
@@ -158,12 +158,12 @@ public class ContactPersonFilterStageTest extends BaseDOMTest {
         stage.setWhitelistingTypes(false);
         stage.initialize();
 
-        final ArrayList<Item<Element>> itemCollection = new ArrayList<>();
-        itemCollection.add(new DOMElementItem(entitiesDescriptor));
+        final ArrayList<Item<Element>> items = new ArrayList<>();
+        items.add(new DOMElementItem(entitiesDescriptor));
 
-        stage.execute(itemCollection);
+        stage.execute(items);
 
-        Element filteredEntitiesDescriptor = itemCollection.get(0).unwrap();
+        Element filteredEntitiesDescriptor = items.get(0).unwrap();
         List<Element> entityDescriptors = ElementSupport.getChildElements(filteredEntitiesDescriptor);
         
         Element idpDescriptor = entityDescriptors.get(0);
diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/EntitiesDescriptorAssemblerStageTest.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/EntitiesDescriptorAssemblerStageTest.java
index 38e7189..5917590 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/EntitiesDescriptorAssemblerStageTest.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/EntitiesDescriptorAssemblerStageTest.java
@@ -18,19 +18,18 @@
 package net.shibboleth.metadata.dom.saml;
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
+import org.testng.Assert;
+import org.testng.annotations.Test;
+import org.w3c.dom.Element;
+
 import net.shibboleth.metadata.Item;
 import net.shibboleth.metadata.dom.BaseDOMTest;
 import net.shibboleth.metadata.dom.DOMElementItem;
 import net.shibboleth.metadata.pipeline.ItemOrderingStrategy;
 
-import org.testng.Assert;
-import org.testng.annotations.Test;
-import org.w3c.dom.Element;
-
 /** Unit test for the {@link EntitiesDescriptorAssemblerStage} class. */
 public class EntitiesDescriptorAssemblerStageTest extends BaseDOMTest {
     
@@ -46,7 +45,7 @@ public class EntitiesDescriptorAssemblerStageTest extends BaseDOMTest {
      */
     @Test
     public void testAssemblingWithoutName() throws Exception {
-        Collection<Item<Element>> metadataCollection = buildMetadataCollection();
+        final var metadataCollection = buildMetadataCollection();
         EntitiesDescriptorAssemblerStage stage = new EntitiesDescriptorAssemblerStage();
         stage.setId("foo");
         stage.initialize();
@@ -64,7 +63,7 @@ public class EntitiesDescriptorAssemblerStageTest extends BaseDOMTest {
      */
     @Test
     public void testAssemblingWithName() throws Exception {
-        Collection<Item<Element>> metadataCollection = buildMetadataCollection();
+        final var metadataCollection = buildMetadataCollection();
         EntitiesDescriptorAssemblerStage stage = new EntitiesDescriptorAssemblerStage();
         stage.setId("foo");
         stage.setDescriptorName("nameValue");
@@ -88,7 +87,7 @@ public class EntitiesDescriptorAssemblerStageTest extends BaseDOMTest {
         class ReverseOrder implements ItemOrderingStrategy<Element> {
 
         	@Override
-        	public List<Item<Element>> order(Collection<Item<Element>> items) {
+        	public List<Item<Element>> order(List<Item<Element>> items) {
                 final List<Item<Element>> result = new ArrayList<>(items);
                 Collections.reverse(result);
                 return result;
@@ -96,7 +95,7 @@ public class EntitiesDescriptorAssemblerStageTest extends BaseDOMTest {
             
         }
         
-        Collection<Item<Element>> metadataCollection = buildMetadataCollection();
+        final var metadataCollection = buildMetadataCollection();
         EntitiesDescriptorAssemblerStage stage = new EntitiesDescriptorAssemblerStage();
         stage.setId("foo");
         stage.setItemOrderingStrategy(new ReverseOrder());
@@ -116,7 +115,7 @@ public class EntitiesDescriptorAssemblerStageTest extends BaseDOMTest {
      */
     @Test
     public void testMda87() throws Exception {
-        Collection<Item<Element>> metadataCollection = buildMetadataCollection();
+        final var metadataCollection = buildMetadataCollection();
         EntitiesDescriptorAssemblerStage stage = new EntitiesDescriptorAssemblerStage();
         stage.setId("foo");
         stage.initialize();
@@ -132,7 +131,7 @@ public class EntitiesDescriptorAssemblerStageTest extends BaseDOMTest {
         Assert.assertEquals("urn:oasis:names:tc:SAML:2.0:metadata", nsattr);
     }
 
-    protected Collection<Item<Element>> buildMetadataCollection() throws Exception {
+    protected List<Item<Element>> buildMetadataCollection() throws Exception {
         final ArrayList<Item<Element>> metadataCollection = new ArrayList<>();
 
         Element descriptor = readXMLData("entity1.xml");
@@ -146,4 +145,4 @@ public class EntitiesDescriptorAssemblerStageTest extends BaseDOMTest {
 
         return metadataCollection;
     }
-}
\ No newline at end of file
+}
diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/EntityFilterStageTest.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/EntityFilterStageTest.java
index bd45471..06b5beb 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/EntityFilterStageTest.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/EntityFilterStageTest.java
@@ -19,19 +19,18 @@ package net.shibboleth.metadata.dom.saml;
 
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
+import org.testng.Assert;
+import org.testng.annotations.Test;
+import org.w3c.dom.Element;
+
 import net.shibboleth.metadata.Item;
 import net.shibboleth.metadata.dom.BaseDOMTest;
 import net.shibboleth.metadata.dom.DOMElementItem;
 import net.shibboleth.utilities.java.support.xml.ElementSupport;
 
-import org.testng.Assert;
-import org.testng.annotations.Test;
-import org.w3c.dom.Element;
-
 /** Unit test for {@link EntityFilterStage}. */
 public class EntityFilterStageTest extends BaseDOMTest {
 
@@ -52,7 +51,7 @@ public class EntityFilterStageTest extends BaseDOMTest {
         stage.setWhitelistingEntities(true);
         stage.initialize();
 
-        Collection<Item<Element>> metadataCollection = buildMetadataCollection();
+        final var metadataCollection = buildMetadataCollection();
         stage.execute(metadataCollection);
 
         Assert.assertEquals(metadataCollection.size(), 1);
@@ -70,7 +69,7 @@ public class EntityFilterStageTest extends BaseDOMTest {
         stage.setWhitelistingEntities(false);
         stage.initialize();
 
-        Collection<Item<Element>> metadataCollection = buildMetadataCollection();
+        final var metadataCollection = buildMetadataCollection();
         stage.execute(metadataCollection);
 
         Assert.assertEquals(metadataCollection.size(), 2);
@@ -181,7 +180,7 @@ public class EntityFilterStageTest extends BaseDOMTest {
      * 
      * @throws Exception if something bad happens
      */
-    private Collection<Item<Element>> buildMetadataCollection() throws Exception {
+    private List<Item<Element>> buildMetadataCollection() throws Exception {
         final ArrayList<Item<Element>> metadataCollection = new ArrayList<>();
 
         List<Element> descriptors =
@@ -192,4 +191,4 @@ public class EntityFilterStageTest extends BaseDOMTest {
 
         return metadataCollection;
     }
-}
\ No newline at end of file
+}
diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdattr/EntityAttributeAddingStageTest.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdattr/EntityAttributeAddingStageTest.java
index cb410b9..179e936 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdattr/EntityAttributeAddingStageTest.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdattr/EntityAttributeAddingStageTest.java
@@ -68,7 +68,7 @@ public class EntityAttributeAddingStageTest extends BaseDOMTest {
      */
     @Test
     public void addNoExtensions() throws Exception {
-        final List<Item<Element>> itemCollection = makeItems("noExtensions.xml");
+        final List<Item<Element>> items = makeItems("noExtensions.xml");
         final List<Stage<Element>> stages = new ArrayList<>();
         stages.add(makeStage("http://www.geant.net/uri/dataprotection-code-of-conduct/v1"));
         stages.add(makeStage("another"));
@@ -76,8 +76,8 @@ public class EntityAttributeAddingStageTest extends BaseDOMTest {
         stages.add(makeStage("http://www.geant.net/uri/dataprotection-code-of-conduct/v1"));
         stages.add(makeStage("another"));
         final Pipeline<Element> pipeline = makePipeline(stages);
-        pipeline.execute(itemCollection);
-        final Element result = itemCollection.get(0).unwrap();
+        pipeline.execute(items);
+        final Element result = items.get(0).unwrap();
         final Element expected = readXMLData("added1.xml");
         assertXMLIdentical(expected, result);
     }
@@ -87,7 +87,7 @@ public class EntityAttributeAddingStageTest extends BaseDOMTest {
      */
     @Test
     public void addToExtensions() throws Exception {
-        final List<Item<Element>> itemCollection = makeItems("extensions.xml");
+        final List<Item<Element>> items = makeItems("extensions.xml");
         final List<Stage<Element>> stages = new ArrayList<>();
         stages.add(makeStage("http://www.geant.net/uri/dataprotection-code-of-conduct/v1"));
         stages.add(makeStage("http://example.org/category2"));
@@ -95,8 +95,8 @@ public class EntityAttributeAddingStageTest extends BaseDOMTest {
         stages.add(makeStage("http://www.geant.net/uri/dataprotection-code-of-conduct/v1", "http://macedir.org/entity-category-support"));
         stages.add(makeStage("anotherValue", "anotherAttributeName", "anotherNameFormat"));
         final Pipeline<Element> pipeline = makePipeline(stages);
-        pipeline.execute(itemCollection);
-        final Element result = itemCollection.get(0).unwrap();
+        pipeline.execute(items);
+        final Element result = items.get(0).unwrap();
         final Element expected = readXMLData("added2.xml");
         assertXMLIdentical(expected, result);
     }
@@ -106,7 +106,7 @@ public class EntityAttributeAddingStageTest extends BaseDOMTest {
      */
     @Test
     public void addToExtensionsFirst() throws Exception {
-        final List<Item<Element>> itemCollection = makeItems("extensions.xml");
+        final List<Item<Element>> items = makeItems("extensions.xml");
         final List<Stage<Element>> stages = new ArrayList<>();
         final EntityAttributeAddingStage stage = new EntityAttributeAddingStage();
         stage.setId("test");
@@ -119,8 +119,8 @@ public class EntityAttributeAddingStageTest extends BaseDOMTest {
         stages.add(makeStage("http://www.geant.net/uri/dataprotection-code-of-conduct/v1", "http://macedir.org/entity-category-support"));
         stages.add(makeStage("anotherValue", "anotherAttributeName", "anotherNameFormat"));
         final Pipeline<Element> pipeline = makePipeline(stages);
-        pipeline.execute(itemCollection);
-        final Element result = itemCollection.get(0).unwrap();
+        pipeline.execute(items);
+        final Element result = items.get(0).unwrap();
         final Element expected = readXMLData("added3.xml");
         assertXMLIdentical(expected, result);
     }
@@ -130,7 +130,7 @@ public class EntityAttributeAddingStageTest extends BaseDOMTest {
      */
     @Test
     public void addDuplicates() throws Exception {
-        final List<Item<Element>> itemCollection = makeItems("added2.xml");
+        final List<Item<Element>> items = makeItems("added2.xml");
         final List<Stage<Element>> stages = new ArrayList<>();
         stages.add(makeStage("http://www.geant.net/uri/dataprotection-code-of-conduct/v1"));
         stages.add(makeStage("http://example.org/category2"));
@@ -138,8 +138,8 @@ public class EntityAttributeAddingStageTest extends BaseDOMTest {
         stages.add(makeStage("http://www.geant.net/uri/dataprotection-code-of-conduct/v1", "http://macedir.org/entity-category-support"));
         stages.add(makeStage("anotherValue", "anotherAttributeName", "anotherNameFormat"));
         final Pipeline<Element> pipeline = makePipeline(stages);
-        pipeline.execute(itemCollection);
-        final Element result = itemCollection.get(0).unwrap();
+        pipeline.execute(items);
+        final Element result = items.get(0).unwrap();
         final Element expected = readXMLData("added2.xml");
         assertXMLIdentical(expected, result);
     }
@@ -149,7 +149,7 @@ public class EntityAttributeAddingStageTest extends BaseDOMTest {
      */
     @Test
     public void addToExisting() throws Exception {
-        final List<Item<Element>> itemCollection = makeItems("some.xml");
+        final List<Item<Element>> items = makeItems("some.xml");
         final List<Stage<Element>> stages = new ArrayList<>();
         stages.add(makeStage("http://www.geant.net/uri/dataprotection-code-of-conduct/v1"));
         stages.add(makeStage("http://example.org/category2"));
@@ -157,8 +157,8 @@ public class EntityAttributeAddingStageTest extends BaseDOMTest {
         stages.add(makeStage("http://www.geant.net/uri/dataprotection-code-of-conduct/v1", "http://macedir.org/entity-category-support"));
         stages.add(makeStage("anotherValue", "anotherAttributeName", "anotherNameFormat"));
         final Pipeline<Element> pipeline = makePipeline(stages);
-        pipeline.execute(itemCollection);
-        final Element result = itemCollection.get(0).unwrap();
+        pipeline.execute(items);
+        final Element result = items.get(0).unwrap();
         final Element expected = readXMLData("added2.xml");
         assertXMLIdentical(expected, result);
     }
diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdrpi/EntityRegistrationAuthorityFilterStageTest.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdrpi/EntityRegistrationAuthorityFilterStageTest.java
index c4527ce..543ddcd 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdrpi/EntityRegistrationAuthorityFilterStageTest.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/dom/saml/mdrpi/EntityRegistrationAuthorityFilterStageTest.java
@@ -19,7 +19,6 @@ package net.shibboleth.metadata.dom.saml.mdrpi;
 
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
@@ -54,7 +53,7 @@ public class EntityRegistrationAuthorityFilterStageTest extends BaseDOMTest {
         stage.setDesignatedRegistrationAuthorities(Collections.singletonList("urn:example.org:authority2"));
         stage.initialize();
 
-        Collection<Item<Element>> mdCollection = buildMetadataCollection();
+        final var mdCollection = buildMetadataCollection();
         Assert.assertEquals(mdCollection.size(), 3);
 
         stage.execute(mdCollection);
@@ -75,7 +74,7 @@ public class EntityRegistrationAuthorityFilterStageTest extends BaseDOMTest {
         stage.setDesignatedRegistrationAuthorities(Collections.singletonList("urn:example.org:authority2"));
         stage.initialize();
 
-        Collection<Item<Element>> mdCollection = buildMetadataCollection();
+        final var mdCollection = buildMetadataCollection();
         Assert.assertEquals(mdCollection.size(), 3);
 
         stage.execute(mdCollection);
@@ -161,7 +160,7 @@ public class EntityRegistrationAuthorityFilterStageTest extends BaseDOMTest {
      * 
      * @throws Exception if something bad happens
      */
-    private Collection<Item<Element>> buildMetadataCollection() throws Exception {
+    private List<Item<Element>> buildMetadataCollection() throws Exception {
         final ArrayList<Item<Element>> metadataCollection = new ArrayList<>();
 
         List<Element> descriptors =
diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/CountingStage.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/CountingStage.java
index 0ad8f09..3aab873 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/CountingStage.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/CountingStage.java
@@ -17,7 +17,7 @@
 
 package net.shibboleth.metadata.pipeline;
 
-import java.util.Collection;
+import java.util.List;
 
 import net.shibboleth.metadata.Item;
 
@@ -59,9 +59,9 @@ public class CountingStage<T> extends AbstractStage<T> {
 
     /** {@inheritDoc} */
     @Override
-    protected void doExecute(final Collection<Item<T>> metadataCollection) throws StageProcessingException {
+    protected void doExecute(final List<Item<T>> metadataCollection) throws StageProcessingException {
         invocationCount += 1;
         itemCount += metadataCollection.size();
     }
 
-}
\ No newline at end of file
+}
diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/ItemMetadataFilterStageTest.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/ItemMetadataFilterStageTest.java
index 04d3006..0385eab 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/ItemMetadataFilterStageTest.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/ItemMetadataFilterStageTest.java
@@ -19,6 +19,7 @@ package net.shibboleth.metadata.pipeline;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.List;
 
 import net.shibboleth.metadata.ErrorStatus;
 import net.shibboleth.metadata.InfoStatus;
@@ -77,7 +78,7 @@ public class ItemMetadataFilterStageTest {
      */
     @Test
     public void testNoFilterRequirements() throws Exception {
-        final Collection<Item<String>> metadataCollection = new ArrayList<>(metadataCollectionPrototype);
+        final var metadataCollection = new ArrayList<>(metadataCollectionPrototype);
 
         ItemMetadataFilterStage<String> stage = new ItemMetadataFilterStage<>();
         stage.setId("test");
@@ -98,7 +99,7 @@ public class ItemMetadataFilterStageTest {
      */
     @Test
     public void testSingleFilterRequirement() throws Exception {
-        final Collection<Item<String>> metadataCollection = new ArrayList<>(metadataCollectionPrototype);
+        final List<Item<String>> metadataCollection = new ArrayList<>(metadataCollectionPrototype);
 
         Collection<Class<? extends ItemMetadata>> filterRequirements = new ArrayList<>();
         filterRequirements.add(ErrorStatus.class);
@@ -123,7 +124,7 @@ public class ItemMetadataFilterStageTest {
      */
     @Test
     public void testMultiFilterRequirement() throws Exception {
-        final Collection<Item<String>> metadataCollection = new ArrayList<>(metadataCollectionPrototype);
+        final List<Item<String>> metadataCollection = new ArrayList<>(metadataCollectionPrototype);
 
         Collection<Class<? extends ItemMetadata>> filterRequirements = new ArrayList<>();
         filterRequirements.add(InfoStatus.class);
diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/ItemMetadataTerminationStageTest.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/ItemMetadataTerminationStageTest.java
index 8ecc9fc..a3f283c 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/ItemMetadataTerminationStageTest.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/ItemMetadataTerminationStageTest.java
@@ -19,6 +19,7 @@ package net.shibboleth.metadata.pipeline;
 
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.List;
 
 import net.shibboleth.metadata.ErrorStatus;
 import net.shibboleth.metadata.InfoStatus;
@@ -35,7 +36,7 @@ import org.testng.annotations.Test;
 public class ItemMetadataTerminationStageTest {
 
     /** Unmodifiable, prototype, collection of metadata elements. */
-    private Collection<Item<String>> metadataCollectionPrototype;
+    private List<Item<String>> metadataCollectionPrototype;
 
     /** Metadata element which contains no {@link net.shibboleth.metadata.StatusMetadata} items. */
     private Item<String> md1;
@@ -77,7 +78,7 @@ public class ItemMetadataTerminationStageTest {
      */
     @Test
     public void testNoSelectionRequirements() throws Exception {
-        final Collection<Item<String>> metadataCollection = new ArrayList<>(metadataCollectionPrototype);
+        final List<Item<String>> metadataCollection = new ArrayList<>(metadataCollectionPrototype);
 
         ItemMetadataTerminationStage<String> stage = new ItemMetadataTerminationStage<>();
         stage.setId("test");
@@ -102,7 +103,7 @@ public class ItemMetadataTerminationStageTest {
      */
     @Test
     public void testSingleSelectionRequirement() throws Exception {
-        final Collection<Item<String>> metadataCollection = new ArrayList<>(metadataCollectionPrototype);
+        final List<Item<String>> metadataCollection = new ArrayList<>(metadataCollectionPrototype);
 
         Collection<Class<? extends ItemMetadata>> filterRequirements = new ArrayList<>();
         filterRequirements.add(ErrorStatus.class);
@@ -126,7 +127,7 @@ public class ItemMetadataTerminationStageTest {
      */
     @Test
     public void testMultiSelectionRequirement() throws Exception {
-        final Collection<Item<String>> metadataCollection = new ArrayList<>(metadataCollectionPrototype);
+        final List<Item<String>> metadataCollection = new ArrayList<>(metadataCollectionPrototype);
 
         Collection<Class<? extends ItemMetadata>> filterRequirements = new ArrayList<>();
         filterRequirements.add(InfoStatus.class);
diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/ItemOrderingStageTest.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/ItemOrderingStageTest.java
index ac11d41..9372a0f 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/ItemOrderingStageTest.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/ItemOrderingStageTest.java
@@ -2,7 +2,6 @@
 package net.shibboleth.metadata.pipeline;
 
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 
@@ -17,7 +16,7 @@ public class ItemOrderingStageTest {
     private class ReversalOrderingStrategy<T> implements ItemOrderingStrategy<T> {
 
         @Override
-        public List<Item<T>> order(Collection<Item<T>> items) throws StageProcessingException {
+        public List<Item<T>> order(List<Item<T>> items) throws StageProcessingException {
             final var collection = new ArrayList<Item<T>>();
             collection.addAll(items);
             Collections.reverse(collection);
diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/PipelineMergeStageTest.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/PipelineMergeStageTest.java
index a39117a..2e02d5a 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/PipelineMergeStageTest.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/PipelineMergeStageTest.java
@@ -125,10 +125,7 @@ public class PipelineMergeStageTest {
         MockItem item6 = new MockItem("item6");
         source1.add(item6);
 
-        final List<Collection<Item<String>>> sources = new ArrayList<>();
-        sources.add(source1);
-        
-        strategy.mergeCollection(target, sources);
+        strategy.merge(target, List.of(source1));
         Assert.assertTrue(target.contains(item1));
         Assert.assertTrue(target.contains(item2));
         Assert.assertTrue(target.contains(item3));
@@ -172,11 +169,7 @@ public class PipelineMergeStageTest {
         item9.getItemMetadata().put(new ItemId("itemA"));
         source2.add(item9);
 
-        final List<Collection<Item<String>>> sources = new ArrayList<>();
-        sources.add(source1);
-        sources.add(source2);
-        
-        strategy.mergeCollection(target, sources);
+        strategy.merge(target, List.of(source1, source2));
         Assert.assertTrue(target.contains(item1));
         Assert.assertTrue(target.contains(item2));
         Assert.assertTrue(target.contains(item3));
diff --git a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/TerminatingStage.java b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/TerminatingStage.java
index d08f9d3..05bc560 100644
--- a/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/TerminatingStage.java
+++ b/aggregator-pipeline/src/test/java/net/shibboleth/metadata/pipeline/TerminatingStage.java
@@ -17,7 +17,7 @@
 
 package net.shibboleth.metadata.pipeline;
 
-import java.util.Collection;
+import java.util.List;
 
 import net.shibboleth.metadata.Item;
 
@@ -33,8 +33,8 @@ class TerminatingStage<T> extends AbstractStage<T> {
         setId("TerminatingStage");
     }
 
-    /** {@inheritDoc} */
-    @Override protected void doExecute(Collection<Item<T>> itemCollection) throws StageProcessingException {
+    @Override
+    protected void doExecute(List<Item<T>> items) throws StageProcessingException {
         throw new TerminationException("from TerminatingStage");
     }
 }

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


More information about the commits mailing list