Return null from CultureData.GetLocaleInfoEx (dotnet/coreclr#11422)
authorPedro Lamas <pedrolamas@gmail.com>
Fri, 5 May 2017 19:30:05 +0000 (20:30 +0100)
committerJan Kotas <jkotas@microsoft.com>
Fri, 5 May 2017 19:30:05 +0000 (12:30 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/1a3dfa8c8405fa56ea3de897c43d79650463e74c

src/coreclr/src/mscorlib/src/System/Globalization/CalendarData.Windows.cs
src/coreclr/src/mscorlib/src/System/Globalization/CultureData.Windows.cs

index bf2c73d..89de24d 100644 (file)
@@ -330,7 +330,7 @@ namespace System.Globalization
                     string res = CultureData.GetLocaleInfoEx(localeName, lcType);
 
                     // if it succeeded remember the override for the later callers
-                    if (res != "")
+                    if (res != null)
                     {
                         // Remember this was the override (so we can look for duplicates later in the enum function)
                         context.userOverride = res;
index 67d5201..c39327e 100644 (file)
@@ -180,7 +180,7 @@ namespace System.Globalization
                 return new String(pBuffer);
             }
 
-            return "";
+            return null;
         }
 
         internal static unsafe int GetLocaleInfoExInt(String localeName, uint field)