You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2016/12/08 22:53:39 UTC
[13/50] tinkerpop git commit: found a bug in PJacksonDeserializer
around var arg handling. I thought that I had TINKERPOP-1567 fixed until I
did a manual test and realized that GraphSONTranslator bypass var args and
creates Collection -- which is correct
found a bug in PJacksonDeserializer around var arg handling. I thought that I had TINKERPOP-1567 fixed until I did a manual test and realized that GraphSONTranslator bypass var args and creates Collection -- which is correct. Thus, the test case wasn't being tested. I added the traversal the test_remote_connection and tweaked the PJacksonDeserializer. CTR.
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/9e82b4d3
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/9e82b4d3
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/9e82b4d3
Branch: refs/heads/TINKERPOP-1564
Commit: 9e82b4d33c275ef846e294bf145ff690ec816c0a
Parents: 8a5c45b
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Mon Nov 28 13:41:45 2016 -0700
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Mon Nov 28 13:41:45 2016 -0700
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
.../io/graphson/GraphSONTraversalSerializersV2d0.java | 9 +++++++--
.../jython/tests/driver/test_driver_remote_connection.py | 5 +++++
3 files changed, 13 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9e82b4d3/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 39fb56a..9791b64 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
TinkerPop 3.2.4 (Release Date: NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+* Fixed a bug in Gremlin-Java GraphSON deserialization around `P.within()` and `P.without()`.
* Converted Spark process suite tests to "integration" tests.
* Fixed a bug in `InlineFilterStrategy` having to do with folding `HasContainers` into `VertexStep`.
* Deprecated `HasContainer.makeHasContainers()` which was used to dissect `AndP` and shouldn't be used at the TinkerPop-level.
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9e82b4d3/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTraversalSerializersV2d0.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTraversalSerializersV2d0.java b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTraversalSerializersV2d0.java
index 03e1b15..267f8cb 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTraversalSerializersV2d0.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphson/GraphSONTraversalSerializersV2d0.java
@@ -312,8 +312,13 @@ final class GraphSONTraversalSerializersV2d0 {
return P.without((Collection) value);
else
return (P) P.class.getMethod(predicate, Collection.class).invoke(null, (Collection) value);
- } else
- return (P) P.class.getMethod(predicate, Object.class).invoke(null, value);
+ } else {
+ try {
+ return (P) P.class.getMethod(predicate, Object.class).invoke(null, value);
+ } catch (final NoSuchMethodException e) {
+ return (P) P.class.getMethod(predicate, Object[].class).invoke(null, (Object) new Object[]{value});
+ }
+ }
} catch (final Exception e) {
throw new IllegalStateException(e.getMessage(), e);
}
http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/9e82b4d3/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection.py
----------------------------------------------------------------------
diff --git a/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection.py b/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection.py
index 9f3e466..6b057d5 100644
--- a/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection.py
+++ b/gremlin-python/src/main/jython/tests/driver/test_driver_remote_connection.py
@@ -60,6 +60,11 @@ class TestDriverRemoteConnection(TestCase):
assert 0 == g.V().repeat(both()).times(5)[0:0].count().next()
assert 4 == g.V()[2:].count().next()
assert 2 == g.V()[:2].count().next()
+ #
+ results = g.withSideEffect('a',['josh','peter']).V(1).out('created').in_('created').values('name').where(within('a')).toList()
+ assert 2 == len(results)
+ assert 'josh' in results
+ assert 'peter' in results
# todo: need a traversal metrics deserializer
g.V().out().profile().next()
connection.close()