[
https://issues.apache.org/jira/browse/TINKERPOP-2348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17635020#comment-17635020
]
ASF GitHub Bot commented on TINKERPOP-2348:
-------------------------------------------
vkagamlyk commented on code in PR #1867:
URL: https://github.com/apache/tinkerpop/pull/1867#discussion_r1024544954
##########
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:
why is the `edgeIdsOrElements` array copied through the list?
> Enable nullable checks
> ----------------------
>
> Key: TINKERPOP-2348
> URL: https://issues.apache.org/jira/browse/TINKERPOP-2348
> Project: TinkerPop
> Issue Type: Improvement
> Components: dotnet
> Affects Versions: 3.4.11
> Reporter: Florian Hockmann
> Assignee: Florian Hockmann
> Priority: Minor
>
> Gremlin.NET should enable [nullable
> checks|https://devblogs.microsoft.com/dotnet/embracing-nullable-reference-types/]
> to clearly communicate to users what can be {{null}} in Gremlin.NET and also
> to possibly find possible {{NullReferenceExceptions}} easier in our own code.
> The recommendation from Microsoft is to update libraries during the so-called
> _"nullable rollout phase"_ which ends in November with the expected release
> of .NET 5 which should have nullable checks enabled by default.
> We can add .NET Core 3.1 as an additional target framework to get the
> nullable checks and still also target .NET Standard to stay platform
> independent and to also still support .NET Framework and older .NET Core
> versions.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)