dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #34183
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17548: minor change in LinearNodePipeline
------------------------------------------------------------
revno: 17548
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-11-20 16:36:25 +0700
message:
minor change in LinearNodePipeline
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/LinearNodePipeline.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/LinearNodePipeline.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/LinearNodePipeline.java 2014-06-26 05:19:55 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/node/LinearNodePipeline.java 2014-11-20 09:36:25 +0000
@@ -28,8 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE
*/
-import com.google.common.collect.Lists;
-
+import java.util.ArrayList;
import java.util.List;
import static com.google.common.base.Preconditions.checkNotNull;
@@ -44,23 +43,28 @@
private class NodeTransformerWithArgs
{
NodeTransformer transformer;
- List<String> args;
+ List<String> arguments;
- private NodeTransformerWithArgs( NodeTransformer transformer, List<String> args )
+ NodeTransformerWithArgs( NodeTransformer transformer, List<String> arguments )
{
this.transformer = transformer;
- this.args = args;
+ this.arguments = arguments;
+ }
+
+ Node transform( Node node )
+ {
+ return transformer.transform( node, arguments );
}
}
- private List<NodeTransformerWithArgs> nodeTransformers = Lists.newArrayList();
+ private List<NodeTransformerWithArgs> nodeTransformers = new ArrayList<>();
@Override
public Node process( Node node )
{
- for ( NodeTransformerWithArgs nodeTransformerWithArgs : nodeTransformers )
+ for ( NodeTransformerWithArgs nodeTransformer : nodeTransformers )
{
- node = nodeTransformerWithArgs.transformer.transform( node, nodeTransformerWithArgs.args );
+ node = nodeTransformer.transform( node );
if ( node == null )
{
@@ -73,11 +77,11 @@
public void addTransformer( NodeTransformer nodeTransformer )
{
- nodeTransformers.add( new NodeTransformerWithArgs( checkNotNull( nodeTransformer ), Lists.<String>newArrayList() ) );
+ nodeTransformers.add( new NodeTransformerWithArgs( checkNotNull( nodeTransformer ), new ArrayList<String>() ) );
}
- public void addTransformer( NodeTransformer nodeTransformer, List<String> args )
+ public void addTransformer( NodeTransformer nodeTransformer, List<String> arguments )
{
- nodeTransformers.add( new NodeTransformerWithArgs( checkNotNull( nodeTransformer ), args ) );
+ nodeTransformers.add( new NodeTransformerWithArgs( checkNotNull( nodeTransformer ), arguments ) );
}
}