You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2020/06/11 16:54:40 UTC
[tinkerpop] 01/01: Merge branch 'TINKERPOP-2361'
This is an automated email from the ASF dual-hosted git repository.
spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 16ac4d6a8d66173866f1764ec10b15b7cb1bbc4b
Merge: 2e6f922 70208c2
Author: Stephen Mallette <sp...@genoprime.com>
AuthorDate: Thu Jun 11 12:54:23 2020 -0400
Merge branch 'TINKERPOP-2361'
CHANGELOG.asciidoc | 1 +
docs/src/upgrade/release-3.5.x.asciidoc | 26 ++++++++++++++++++++++
.../gremlin/process/traversal/Bytecode.java | 9 ++++++--
.../gremlin/process/traversal/TraversalTest.java | 15 +++++++++++++
gremlin-dotnet/glv/GraphTraversal.template | 16 +++++++++++--
.../src/Gremlin.Net/Process/Traversal/Bytecode.cs | 7 +++++-
.../Process/Traversal/DefaultTraversal.cs | 5 +++++
.../Process/Traversal/GraphTraversal.cs | 16 +++++++++++--
.../Gremlin.Net/Process/Traversal/ITraversal.cs | 5 +++++
.../Process/Traversal/GraphTraversalSourceTests.cs | 11 +++++++++
.../IO/GraphSON/BytecodeGraphSONSerializerTests.cs | 1 +
.../gremlin-javascript/lib/process/bytecode.js | 8 ++++++-
.../gremlin-javascript/test/unit/traversal-test.js | 20 +++++++++++++++--
gremlin-python/glv/TraversalSource.template | 2 ++
.../python/gremlin_python/process/traversal.py | 2 ++
.../main/python/tests/process/test_traversal.py | 22 +++++++++++++-----
.../tinkergraph/structure/TinkerGraphPlayTest.java | 4 ++--
17 files changed, 152 insertions(+), 18 deletions(-)
diff --cc gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs
index 5db0fe8,fc3011e..7149e8b
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs
@@@ -110,17 -110,22 +110,22 @@@ namespace Gremlin.Net.Process.Traversa
private object ConvertArgument(object argument, bool searchBindings)
{
+ if (null == argument)
+ {
+ return null;
+ }
-
++
if (searchBindings)
{
var variable = Bindings.GetBoundVariable(argument);
if (variable != null)
return new Binding(variable, ConvertArgument(argument, false));
}
+
- if (null == argument)
- {
- return null;
- }
-
+ if (argument is ITraversal traversal && !traversal.IsAnonymous)
+ throw new ArgumentException(
+ $"The child traversal of {traversal.Bytecode} was not spawned anonymously - use the __ class rather than a TraversalSource to construct the child traversal");
-
++
if (IsDictionaryType(argument.GetType()))
{