You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by np...@apache.org on 2017/11/23 17:36:50 UTC
[sling-org-apache-sling-pipes] branch master updated: small
optimisation of container pipe
This is an automated email from the ASF dual-hosted git repository.
npeltier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-pipes.git
The following commit(s) were added to refs/heads/master by this push:
new f8717eb small optimisation of container pipe
f8717eb is described below
commit f8717eb4cc348eba5b082ef555ac95dfb4a7f070
Author: npeltier <pe...@gmail.com>
AuthorDate: Thu Nov 23 18:36:42 2017 +0100
small optimisation of container pipe
---
src/main/java/org/apache/sling/pipes/ContainerPipe.java | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/main/java/org/apache/sling/pipes/ContainerPipe.java b/src/main/java/org/apache/sling/pipes/ContainerPipe.java
index c34a4f3..19f7438 100644
--- a/src/main/java/org/apache/sling/pipes/ContainerPipe.java
+++ b/src/main/java/org/apache/sling/pipes/ContainerPipe.java
@@ -21,7 +21,6 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -45,8 +44,6 @@ public class ContainerPipe extends BasePipe {
List<Pipe> pipeList = new ArrayList<>();
- List<Pipe> reversePipeList = new ArrayList<>();
-
long sleep = 0L;
/**
* Constructor
@@ -67,10 +64,8 @@ public class ContainerPipe extends BasePipe {
pipe.setBindings(bindings);
pipes.put(pipe.getName(), pipe);
pipeList.add(pipe);
- reversePipeList.add(pipe);
}
}
- Collections.reverse(reversePipeList);
}
@Override
@@ -125,7 +120,7 @@ public class ContainerPipe extends BasePipe {
* @return pipe in the last position of the container's pipes
*/
public Pipe getLastPipe() {
- return reversePipeList.iterator().next();
+ return pipeList.get(pipeList.size() - 1);
}
/**
--
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].