[java-metadata-aggregator] branch main updated: Avoid the need to know the exact type of pipeline

Ian Young ian at iay.org.uk
Wed Oct 19 09:03:45 UTC 2022


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=c7d818410593111c07a84f802f7b866cf081a2aa

The following commit(s) were added to refs/heads/main by this push:
     new c7d8184  Avoid the need to know the exact type of pipeline
c7d8184 is described below

commit c7d818410593111c07a84f802f7b866cf081a2aa
Author: Ian Young <ian at iay.org.uk>
AuthorDate: Wed Oct 19 10:03:42 2022 +0100

    Avoid the need to know the exact type of pipeline
---
 .../main/java/net/shibboleth/metadata/cli/SimpleCommandLine.java  | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/mda-cli/src/main/java/net/shibboleth/metadata/cli/SimpleCommandLine.java b/mda-cli/src/main/java/net/shibboleth/metadata/cli/SimpleCommandLine.java
index 9f78062..2055a5b 100644
--- a/mda-cli/src/main/java/net/shibboleth/metadata/cli/SimpleCommandLine.java
+++ b/mda-cli/src/main/java/net/shibboleth/metadata/cli/SimpleCommandLine.java
@@ -23,7 +23,6 @@ import java.util.Date;
 
 import javax.annotation.Nonnull;
 
-import net.shibboleth.metadata.Item;
 import net.shibboleth.metadata.Version;
 import net.shibboleth.metadata.pipeline.Pipeline;
 import net.shibboleth.metadata.pipeline.TerminationException;
@@ -32,7 +31,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.BeansException;
 import org.springframework.context.support.FileSystemXmlApplicationContext;
-import org.w3c.dom.Element;
 
 /**
  * A simple driver for the metadata aggregator.
@@ -108,8 +106,7 @@ public final class SimpleCommandLine {
         log.debug("Retrieving pipeline from Spring context");
         final String pipelineName = cli.getPipelineName();
         
-        final Pipeline<Element> pipeline =
-            (Pipeline<Element>) appCtx.getBean(pipelineName, Pipeline.class);
+        final Pipeline<?> pipeline = appCtx.getBean(pipelineName, Pipeline.class);
 
         if (pipeline == null) {
             log.error("No net.shibboleth.metadata.pipeline.Pipeline, with ID {}, defined in Spring configuration",
@@ -125,10 +122,9 @@ public final class SimpleCommandLine {
                 log.debug("Retrieved pipeline has already been initialized");
             }
 
-            final ArrayList<Item<Element>> itemCollection = new ArrayList<>();
             final Date startTime = new Date();
             log.info("Pipeline '{}' execution starting at {}", pipelineName, startTime);
-            pipeline.execute(itemCollection);
+            pipeline.execute(new ArrayList<>());
             final Date endTime = new Date();
             log.info("Pipeline '{}' execution completed at {}; run time {} seconds",
                     new Object[]{pipelineName, endTime, (endTime.getTime()-startTime.getTime())/1000f});

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


More information about the commits mailing list