lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cpoersc...@apache.org
Subject [26/50] lucene-solr:jira/solr-10990: SOLR-11242: QueryParser: re-use the LookaheadSuccess exception.
Date Wed, 06 Sep 2017 09:39:28 GMT
SOLR-11242: QueryParser: re-use the LookaheadSuccess exception.


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/3901a13d
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/3901a13d
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/3901a13d

Branch: refs/heads/jira/solr-10990
Commit: 3901a13de3aa2ce172fea244f84ab613b3314041
Parents: c2c2e8a
Author: David Smiley <dsmiley@apache.org>
Authored: Sun Sep 3 16:59:31 2017 -0400
Committer: David Smiley <dsmiley@apache.org>
Committed: Sun Sep 3 16:59:31 2017 -0400

----------------------------------------------------------------------
 solr/CHANGES.txt                                           | 2 ++
 solr/core/build.xml                                        | 5 +++++
 solr/core/src/java/org/apache/solr/parser/QueryParser.java | 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3901a13d/solr/CHANGES.txt
----------------------------------------------------------------------
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 493d52f..4ccc609 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -128,6 +128,8 @@ Optimizations
 
 * SOLR-11124: MoveReplicaCmd should skip deleting old replica in case of its node is not
live (Cao Manh Dat)
 
+* SOLR-11242: QueryParser: re-use the LookaheadSuccess exception. (Michael Braun via David
Smiley)
+
 Other Changes
 ----------------------
 

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3901a13d/solr/core/build.xml
----------------------------------------------------------------------
diff --git a/solr/core/build.xml b/solr/core/build.xml
index 532a3c2..af4c262 100644
--- a/solr/core/build.xml
+++ b/solr/core/build.xml
@@ -83,6 +83,11 @@
                      byline="true"
                      match="public QueryParser\(QueryParserTokenManager "
                      replace="protected QueryParser(QueryParserTokenManager "/>
+      <!-- change an exception used for signaling to be static -->
+      <replaceregexp file="src/java/org/apache/solr/parser/QueryParser.java"
+                     byline="true"
+                     match="final private LookaheadSuccess jj_ls ="
+                     replace="static final private LookaheadSuccess jj_ls =" />
       <replace token="StringBuffer" value="StringBuilder" encoding="UTF-8">
          <fileset dir="src/java/org/apache/solr/parser" includes="ParseException.java
TokenMgrError.java"/>
       </replace>

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/3901a13d/solr/core/src/java/org/apache/solr/parser/QueryParser.java
----------------------------------------------------------------------
diff --git a/solr/core/src/java/org/apache/solr/parser/QueryParser.java b/solr/core/src/java/org/apache/solr/parser/QueryParser.java
index 42e982f..50e36dd 100644
--- a/solr/core/src/java/org/apache/solr/parser/QueryParser.java
+++ b/solr/core/src/java/org/apache/solr/parser/QueryParser.java
@@ -767,7 +767,7 @@ public class QueryParser extends SolrQueryParserBase implements QueryParserConst
   }
 
   static private final class LookaheadSuccess extends java.lang.Error { }
-  final private LookaheadSuccess jj_ls = new LookaheadSuccess();
+  static final private LookaheadSuccess jj_ls = new LookaheadSuccess();
   private boolean jj_scan_token(int kind) {
     if (jj_scanpos == jj_lastpos) {
       jj_la--;


Mime
View raw message