lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [lucenenet] 10/42: BUG: Lucene.Net.Analysis.Common.Analysis.Util.AbstractAnalysisFactory: Fixed parsing issue converting string to int in ambient culture
Date Wed, 07 Aug 2019 22:26:07 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit d7660abdb8c186f5e47016576e2ae4b160c057a6
Author: Shad Storhaug <shad@shadstorhaug.com>
AuthorDate: Wed Jul 31 07:13:30 2019 +0700

    BUG: Lucene.Net.Analysis.Common.Analysis.Util.AbstractAnalysisFactory: Fixed parsing issue
converting string to int in ambient culture
---
 .../Analysis/Util/AbstractAnalysisFactory.cs                          | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/AbstractAnalysisFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Util/AbstractAnalysisFactory.cs
index ec93dc4..a0e4911 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Util/AbstractAnalysisFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Util/AbstractAnalysisFactory.cs
@@ -198,7 +198,7 @@ namespace Lucene.Net.Analysis.Util
         /// </summary>
         protected int RequireInt32(IDictionary<string, string> args, string name)
         {
-            return int.Parse(Require(args, name));
+            return int.Parse(Require(args, name), CultureInfo.InvariantCulture);
         }
 
         /// <summary>
@@ -210,7 +210,7 @@ namespace Lucene.Net.Analysis.Util
             if (args.TryGetValue(name, out s))
             {
                 args.Remove(name);
-                return int.Parse(s);
+                return int.Parse(s, CultureInfo.InvariantCulture);
             }
             return defaultVal;
         }


Mime
View raw message