tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject tinkerpop git commit: Removed a hack that was required in 3.2.x in JavaTranslator
Date Tue, 17 Apr 2018 19:08:07 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/tp33 d63638b83 -> 358f99b18


Removed a hack that was required in 3.2.x in JavaTranslator

The method in question that needed that hack for things to cache properly is no longer present
in 3.3.x so that little bit of code is no longer needed. CTR


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

Branch: refs/heads/tp33
Commit: 358f99b186f3fceb856d42b591c281cac2ec5df3
Parents: d63638b
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Tue Apr 17 15:06:31 2018 -0400
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Tue Apr 17 15:06:31 2018 -0400

----------------------------------------------------------------------
 .../org/apache/tinkerpop/gremlin/jsr223/JavaTranslator.java    | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/358f99b1/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/JavaTranslator.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/JavaTranslator.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/JavaTranslator.java
index 0664048..7480974 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/JavaTranslator.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/JavaTranslator.java
@@ -256,10 +256,8 @@ public final class JavaTranslator<S extends TraversalSource, T extends
Traversal
     private synchronized static void buildMethodCache(final Object delegate, final Map<String,
List<Method>> methodCache) {
         if (methodCache.isEmpty()) {
             for (final Method method : delegate.getClass().getMethods()) {
-                if (!(method.getName().equals("addV") && method.getParameterCount()
== 1 && method.getParameters()[0].getType().equals(Object[].class))) { // hack cause
its hard to tell Object[] vs. String :|
-                    final List<Method> list = methodCache.computeIfAbsent(method.getName(),
k -> new ArrayList<>());
-                    list.add(method);
-                }
+                final List<Method> list = methodCache.computeIfAbsent(method.getName(),
k -> new ArrayList<>());
+                list.add(method);
             }
             GLOBAL_METHOD_CACHE.put(delegate.getClass(), methodCache);
         }


Mime
View raw message