You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2017/01/17 01:45:41 UTC

[2/2] tinkerpop git commit: Changed btecode representation of excluded strategies to prevent serialization issues.

Changed btecode representation of excluded strategies to prevent serialization issues.


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

Branch: refs/heads/TINKERPOP-1601
Commit: ff844904df2b9e5d48c4725e8679f139c0e463e0
Parents: 3179f6d
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Tue Jan 17 02:44:13 2017 +0100
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Tue Jan 17 02:44:13 2017 +0100

----------------------------------------------------------------------
 .../tinkerpop/gremlin/process/traversal/Bytecode.java       | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ff844904/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Bytecode.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Bytecode.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Bytecode.java
index 7ea5f6f..13ea291 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Bytecode.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Bytecode.java
@@ -61,13 +61,10 @@ public final class Bytecode implements Cloneable, Serializable {
      */
     public void addSource(final String sourceName, final Object... arguments) {
         if (sourceName.equals(TraversalSource.Symbols.withoutStrategies)) {
-            final Class<TraversalStrategy>[] classes = new Class[arguments.length];
-            for (int i = 0; i < arguments.length; i++) {
-                classes[i] = arguments[i] instanceof TraversalStrategyProxy ?
-                        ((TraversalStrategyProxy) arguments[i]).getStrategyClass() :
-                        (Class) arguments[i];
+            for (final Object argument : arguments) {
+                this.sourceInstructions.add(new Instruction(sourceName, argument instanceof TraversalStrategyProxy
+                        ? ((TraversalStrategyProxy) argument).getStrategyClass() : (Class) argument));
             }
-            this.sourceInstructions.add(new Instruction(sourceName, classes));
         } else
             this.sourceInstructions.add(new Instruction(sourceName, flattenArguments(arguments)));
         Bindings.clear();