You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/12/29 21:30:16 UTC

[GitHub] [ignite] ptupitsyn commented on a change in pull request #8627: IGNITE-13883 .NET: Simplify and optimize TryReadSystemType

ptupitsyn commented on a change in pull request #8627:
URL: https://github.com/apache/ignite/pull/8627#discussion_r549856450



##########
File path: modules/platforms/dotnet/Apache.Ignite.Core/Impl/Binary/BinaryUtils.cs
##########
@@ -1170,6 +1170,38 @@ public static T[] ReadArray<T>(BinaryReader ctx, bool typed)
             return vals;
         }
 
+        /// <summary>
+        /// Read string array.
+        /// </summary>
+        /// <param name="stream">Stream</param>
+        /// <returns>String array.</returns>
+        public static string[] ReadStringArray(IBinaryStream stream)
+        {
+            var len = stream.ReadInt();
+            var res = new string[len];
+
+            for (var i = 0; i < len; i++)
+                res[i] = stream.ReadByte() == HdrNull ? null : ReadString(stream);

Review comment:
       Good point, added header checks to this and related methods.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org