This is an automated email from the ASF dual-hosted git repository.

florianhockmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit a5f851cf88386b5127d8b0a9b9c970cb3bd815c4
Merge: 51bd0d6e4c 6d007fb3e1
Author: Florian Hockmann <f...@florian-hockmann.de>
AuthorDate: Wed Aug 9 10:25:27 2023 +0200

    Merge branch '3.6-dev'

 CHANGELOG.asciidoc                                   |  1 +
 .../IO/GraphBinary/TypeSerializerRegistry.cs         | 20 ++++++++++----------
 .../Structure/IO/GraphSON/GraphSONWriter.cs          |  6 +++---
 3 files changed, 14 insertions(+), 13 deletions(-)

diff --cc gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
index 5b1725ffce,a7d4d01128..f62dac2bf7
--- a/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
+++ b/gremlin-dotnet/src/Gremlin.Net/Structure/IO/GraphSON/GraphSONWriter.cs
@@@ -133,13 -132,13 +133,13 @@@ namespace Gremlin.Net.Structure.IO.Grap
              return objectData;         
          }
  
 -        private IGraphSONSerializer TryGetSerializerFor(Type type)
 +        private IGraphSONSerializer? TryGetSerializerFor(Type type)
          {
-             if (Serializers.ContainsKey(type))
+             if (Serializers.TryGetValue(type, out var serializer))
              {
-                 return Serializers[type];
+                 return serializer;
              }
-             foreach (var supportedType in Serializers.Keys)
+             foreach (var supportedType in new List<Type>(Serializers.Keys))
                  if (supportedType.IsAssignableFrom(type))
                  {
                      return Serializers[supportedType];

Reply via email to