You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2022/11/17 08:37:37 UTC
[GitHub] [tinkerpop] FlorianHockmann commented on a diff in pull request #1867: TINKERPOP-2348 Add nullable annotations
FlorianHockmann commented on code in PR #1867:
URL: https://github.com/apache/tinkerpop/pull/1867#discussion_r1024892984
##########
gremlin-dotnet/src/Gremlin.Net/Process/Traversal/GraphTraversal.cs:
##########
@@ -96,15 +99,15 @@ private GraphTraversal(ICollection<ITraversalStrategy> traversalStrategies, Byte
/// <summary>
/// Adds the E step to this <see cref="GraphTraversal{SType, EType}" />.
/// </summary>
- public GraphTraversal<TStart, Edge> E (params object[] edgeIdsOrElements)
+ public GraphTraversal<TStart, Edge> E (params object?[]? edgeIdsOrElements)
{
if (edgeIdsOrElements == null)
{
- Bytecode.AddStep("E", new object[] { null });
+ Bytecode.AddStep("E", new object?[] { null });
}
else
{
- var args = new List<object>(edgeIdsOrElements.Length);
+ var args = new List<object?>(edgeIdsOrElements.Length);
Review Comment:
This file was originally generated automatically by some Groovy script that created basically one C# implementation of every Java implementation of a Gremlin step. It simply created a new list for all arguments so it could add all arguments to that list and then pass the list to `Bytecode.AddStep()`.
Now that we no longer generate this code automatically, we could of course improve / optimize it by hand and remove these unnecessary creation of lists for example. However I think that should be done in a separate PR.
--
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: commits-unsubscribe@tinkerpop.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org