FlorianHockmann commented on a change in pull request #1557:
URL: https://github.com/apache/tinkerpop/pull/1557#discussion_r802759384
##########
File path: gremlin-dotnet/src/Gremlin.Net/Process/Traversal/P.cs
##########
@@ -85,79 +85,79 @@ public P Or(P otherPredicate)
public static P Between(params object[] args)
{
- var value = args.Length == 1 ? args[0] : args;
+ var value = args != null && args.Length == 1 ? args[0] : args;
return new P("between", value);
}
public static P Eq(params object[] args)
{
- var value = args.Length == 1 ? args[0] : args;
+ var value = args != null && args.Length == 1 ? args[0] : args;
return new P("eq", value);
}
public static P Gt(params object[] args)
{
- var value = args.Length == 1 ? args[0] : args;
+ var value = args != null && args.Length == 1 ? args[0] : args;
Review comment:
I've already noticed that we need to check `args` for `null` in some
Gremlin steps while working on TINKERPOP-2518. What I'm wondering however: Do
we really want to allow `null` everywhere, for every step and for all
predicates?
`P.Gt(null)` for example doesn't look valid to me. So, I think we should
ideally check for `null` here and then throw an `ArgumentNullException`.
But we need to agree on where we want to allow `null` and where not and then
check that ideally already in the GLVs instead of throwing some null pointer
exception on the server and return that to the user.
@spmallette You've improved `null` handling in the last releases. What's
your take on this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]