Repository: tinkerpop
Updated Branches:
  refs/heads/master b0be1d48e -> b0d2a277a


Fixed array handling in `.hasId()` and `.hasValue()`.

This fix was originally implemented by @BrynCooke in a TP fork.


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

Branch: refs/heads/master
Commit: c66424d2ebb29508095eee1ad516d2d6fb7475dd
Parents: 72aca97
Author: Daniel Kuppitz <daniel_kupp...@hotmail.com>
Authored: Fri Jan 13 12:30:49 2017 +0100
Committer: Daniel Kuppitz <daniel_kupp...@hotmail.com>
Committed: Fri Jan 13 12:30:49 2017 +0100

----------------------------------------------------------------------
 .../gremlin/process/traversal/dsl/graph/GraphTraversal.java    | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/c66424d2/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
----------------------------------------------------------------------
diff --git 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
index fae2d67..abcb870 100644
--- 
a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
+++ 
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/dsl/graph/GraphTraversal.java
@@ -989,7 +989,7 @@ public interface GraphTraversal<S, E> extends Traversal<S, 
E> {
             return this.hasId((P) id);
         else {
             final List<Object> ids = new ArrayList<>();
-            if (id.getClass().isArray()) {
+            if (id instanceof Object[]) {
                 for (final Object i : (Object[]) id) {
                     ids.add(i);
                 }
@@ -1031,14 +1031,14 @@ public interface GraphTraversal<S, E> extends 
Traversal<S, E> {
             return this.hasValue((P) value);
         else {
             final List<Object> values = new ArrayList<>();
-            if (value.getClass().isArray()) {
+            if (value instanceof Object[]) {
                 for (final Object v : (Object[]) value) {
                     values.add(v);
                 }
             } else
                 values.add(value);
             for (final Object v : otherValues) {
-                if (v.getClass().isArray()) {
+                if (v instanceof Object[]) {
                     for (final Object vv : (Object[]) v) {
                         values.add(vv);
                     }

Reply via email to