mikepersonick commented on a change in pull request #1557:
URL: https://github.com/apache/tinkerpop/pull/1557#discussion_r803728562
##########
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:
> `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`.
The main problem with this is that in a ternary boolean logics system, (true
|| error) = true. So if P.Gt(null) we connected to a predicate that evaluated
to `true` we would want to evaluate the whole value expression to `true`, not
throw an ArgumentNullException up front. We defer this judgment until the top
level of the boolean expression and then reduce `error` to `false` if it has
not been eliminated by a connective.
--
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]