You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by sy...@apache.org on 2016/09/11 21:31:18 UTC

[47/50] [abbrv] lucenenet git commit: Fixed string formatting bugs in QueryParser.Analyzing.AnalyzingQueryParser

Fixed string formatting bugs in QueryParser.Analyzing.AnalyzingQueryParser


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/bf635018
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/bf635018
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/bf635018

Branch: refs/heads/master
Commit: bf635018b7eac84c3dd0ca94a76246eea673914e
Parents: 193c348
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sat Sep 3 00:34:59 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sat Sep 3 00:34:59 2016 +0700

----------------------------------------------------------------------
 .../Analyzing/AnalyzingQueryParser.cs                     | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/bf635018/src/Lucene.Net.QueryParser/Analyzing/AnalyzingQueryParser.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.QueryParser/Analyzing/AnalyzingQueryParser.cs b/src/Lucene.Net.QueryParser/Analyzing/AnalyzingQueryParser.cs
index d61b9d0..a98a26d 100644
--- a/src/Lucene.Net.QueryParser/Analyzing/AnalyzingQueryParser.cs
+++ b/src/Lucene.Net.QueryParser/Analyzing/AnalyzingQueryParser.cs
@@ -68,12 +68,12 @@ namespace Lucene.Net.QueryParser.Analyzing
             if (termStr == null)
             {
                 //can't imagine this would ever happen
-                throw new ParseException("Passed null value as term to getWildcardQuery");
+                throw new ParseException("Passed null value as term to GetWildcardQuery");
             }
             if (!AllowLeadingWildcard && (termStr.StartsWith("*") || termStr.StartsWith("?")))
             {
                 throw new ParseException("'*' or '?' not allowed as first character in WildcardQuery"
-                                        + " unless getAllowLeadingWildcard() returns true");
+                                        + " unless AllowLeadingWildcard returns true");
             }
 
             Match wildcardMatcher = wildcardPattern.Match(termStr);
@@ -172,7 +172,7 @@ namespace Lucene.Net.QueryParser.Analyzing
                     if (null != multipleOutputs)
                     {
                         throw new ParseException(
-                            string.Format(Locale, "Analyzer created multiple terms for \"%s\": %s", chunk, multipleOutputs.ToString()));
+                            string.Format(Locale, @"Analyzer created multiple terms for ""{0}"": {1}", chunk, multipleOutputs.ToString()));
                     }
                 }
                 else
@@ -180,13 +180,13 @@ namespace Lucene.Net.QueryParser.Analyzing
                     // nothing returned by analyzer.  Was it a stop word and the user accidentally
                     // used an analyzer with stop words?
                     stream.End();
-                    throw new ParseException(string.Format(Locale, "Analyzer returned nothing for \"%s\"", chunk));
+                    throw new ParseException(string.Format(Locale, @"Analyzer returned nothing for ""{0}""", chunk));
                 }
             }
             catch (System.IO.IOException e)
             {
                 throw new ParseException(
-                    string.Format(Locale, "IO error while trying to analyze single term: \"%s\"", termStr));
+                    string.Format(Locale, @"IO error while trying to analyze single term: ""{0}""", termStr));
             }
             finally
             {