Merge pull request #1151 from JonHanna/singleton_empty_array

Use singleton for zero-element arrays.
This commit is contained in:
James Newton-King
2017-01-09 15:11:14 +13:00
committed by GitHub
11 changed files with 69 additions and 39 deletions
+1 -1
View File
@@ -538,7 +538,7 @@ namespace Newtonsoft.Json
Guid g;
if (s.Length == 0)
{
data = new byte[0];
data = CollectionUtils.ArrayEmpty<byte>();
}
else if (ConvertUtils.TryConvertGuid(s, out g))
{