tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [30/38] tinkerpop git commit: TINKERPOP-1642 Removed some extra iteration in Parameters.getTraversals()
Date Mon, 27 Mar 2017 18:05:43 GMT
TINKERPOP-1642 Removed some extra iteration in Parameters.getTraversals()


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9185f452
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9185f452
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9185f452

Branch: refs/heads/TINKERPOP-1642
Commit: 9185f45273cefca3a0b622e87e1eab825dea0ffe
Parents: 2549650
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Fri Mar 10 12:31:38 2017 -0500
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Mon Mar 27 11:40:39 2017 -0400

----------------------------------------------------------------------
 .../gremlin/process/traversal/step/util/Parameters.java      | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9185f452/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
index 6640e87..93cf1f8 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/util/Parameters.java
@@ -54,7 +54,7 @@ public final class Parameters implements Cloneable, Serializable {
      * {@link #set(Object...)} because when the parameter map is large the cost of iterating
it repeatedly on the
      * high number of calls to {@link #getTraversals()} and {@link #integrateTraversals(TraversalParent)}
is great.
      */
-    private List<Traversal.Admin> traversals = new ArrayList<>();
+    private List<Traversal.Admin<?,?>> traversals = new ArrayList<>();
 
     /**
      * Checks for existence of key in parameter set.
@@ -203,11 +203,7 @@ public final class Parameters implements Cloneable, Serializable {
      */
     public <S, E> List<Traversal.Admin<S, E>> getTraversals() {
         // stupid generics - just need to return "traversals"
-        final List<Traversal.Admin<S, E>> result = new ArrayList<>();
-        for (Traversal.Admin t : traversals) {
-            result.add(t);
-        }
-        return result;
+        return (List<Traversal.Admin<S, E>>) (Object) traversals;
     }
 
     public Parameters clone() {


Mime
View raw message