tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ok...@apache.org
Subject [06/18] tinkerpop git commit: TINKERPOP-1642 Removed some extra iteration in Parameters.getTraversals()
Date Thu, 30 Mar 2017 20:01:51 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/f693cb77
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f693cb77
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f693cb77

Branch: refs/heads/tp32
Commit: f693cb771d97eb98726babc6bafb2bb1b03c338a
Parents: 6294c07
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Fri Mar 10 12:31:38 2017 -0500
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Wed Mar 29 11:20:44 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/f693cb77/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