You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by jo...@apache.org on 2020/06/10 13:49:31 UTC
[tinkerpop] 01/01: TINKERPOP-2377 .NET GLV: Check for null earlier
This is an automated email from the ASF dual-hosted git repository.
jorgebg pushed a commit to branch TINKERPOP-2377
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit c7a552739f12102a32689e6828b215871d29f010
Author: Jorge Bay Gondra <jo...@gmail.com>
AuthorDate: Wed Jun 10 15:49:19 2020 +0200
TINKERPOP-2377 .NET GLV: Check for null earlier
---
gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs
index 490e4e4..5db0fe8 100644
--- a/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Process/Traversal/Bytecode.cs
@@ -110,17 +110,17 @@ namespace Gremlin.Net.Process.Traversal
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 (IsDictionaryType(argument.GetType()))
{
@@ -164,4 +164,4 @@ namespace Gremlin.Net.Process.Traversal
return type.IsConstructedGenericType && type.GetGenericTypeDefinition() == typeof(HashSet<>);
}
}
-}
\ No newline at end of file
+}