lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [lucenenet] 35/42: BUG: Lucene.Net.Tests.Analysis.Common.Analysis.Pattern.TestPatternTokenizer.TestSplitting: int.Parse must be setup in the invariant culture to consistently recognize inputs
Date Wed, 07 Aug 2019 22:26:32 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 acd138963a27e75a95e2fceb2b42fc0a1f818f80
Author: Shad Storhaug <shad@shadstorhaug.com>
AuthorDate: Tue Aug 6 05:29:40 2019 +0700

    BUG: Lucene.Net.Tests.Analysis.Common.Analysis.Pattern.TestPatternTokenizer.TestSplitting:
int.Parse must be setup in the invariant culture to consistently recognize inputs
---
 .../Analysis/Pattern/TestPatternTokenizer.cs                           | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pattern/TestPatternTokenizer.cs
b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pattern/TestPatternTokenizer.cs
index f3c0c47..f0fd263 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pattern/TestPatternTokenizer.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pattern/TestPatternTokenizer.cs
@@ -2,6 +2,7 @@
 using Lucene.Net.Analysis.TokenAttributes;
 using NUnit.Framework;
 using System.Collections.Generic;
+using System.Globalization;
 using System.IO;
 using System.Text;
 using System.Text.RegularExpressions;
@@ -45,7 +46,7 @@ namespace Lucene.Net.Analysis.Pattern
 
             foreach (string[] test in tests)
             {
-                TokenStream stream = new PatternTokenizer(new StringReader(test[2]), new
Regex(test[1], RegexOptions.Compiled), int.Parse(test[0]));
+                TokenStream stream = new PatternTokenizer(new StringReader(test[2]), new
Regex(test[1], RegexOptions.Compiled), int.Parse(test[0], CultureInfo.InvariantCulture));
                 string @out = tsToString(stream);
                 // System.out.println( test[2] + " ==> " + out );
 


Mime
View raw message