From a37adee24ce98d63898e6df19c895f753b791a26 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Mon, 20 Nov 2006 02:29:59 +0000 Subject: [PATCH] remove Java5 method call git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@477008 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/lucene/queryParser/QueryParser.java | 4 +--- src/java/org/apache/lucene/queryParser/QueryParser.jj | 2 +- .../apache/lucene/queryParser/QueryParserTokenManager.java | 6 ++++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/java/org/apache/lucene/queryParser/QueryParser.java b/src/java/org/apache/lucene/queryParser/QueryParser.java index 804ae94099a..3024f24ff28 100644 --- a/src/java/org/apache/lucene/queryParser/QueryParser.java +++ b/src/java/org/apache/lucene/queryParser/QueryParser.java @@ -651,7 +651,7 @@ public class QueryParser implements QueryParserConstants { codePoint += hexToInt(curChar) * codePointMultiplier; codePointMultiplier >>>= 4; if (codePointMultiplier == 0) { - length += Character.toChars(codePoint, output, length); + output[length++] = (char)codePoint; codePoint = 0; } } else if (lastCharWasEscapeChar) { @@ -1347,7 +1347,6 @@ public class QueryParser implements QueryParserConstants { final private void jj_rescan_token() { jj_rescan = true; for (int i = 0; i < 1; i++) { - try { JJCalls p = jj_2_rtns[i]; do { if (p.gen > jj_gen) { @@ -1358,7 +1357,6 @@ public class QueryParser implements QueryParserConstants { } p = p.next; } while (p != null); - } catch(LookaheadSuccess ls) { } } jj_rescan = false; } diff --git a/src/java/org/apache/lucene/queryParser/QueryParser.jj b/src/java/org/apache/lucene/queryParser/QueryParser.jj index eaa1a6c1200..26dbb28d974 100644 --- a/src/java/org/apache/lucene/queryParser/QueryParser.jj +++ b/src/java/org/apache/lucene/queryParser/QueryParser.jj @@ -675,7 +675,7 @@ public class QueryParser { codePoint += hexToInt(curChar) * codePointMultiplier; codePointMultiplier >>>= 4; if (codePointMultiplier == 0) { - length += Character.toChars(codePoint, output, length); + output[length++] = (char)codePoint; codePoint = 0; } } else if (lastCharWasEscapeChar) { diff --git a/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java b/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java index 6c2af636a55..15866829792 100644 --- a/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java +++ b/src/java/org/apache/lucene/queryParser/QueryParserTokenManager.java @@ -969,10 +969,12 @@ protected CharStream input_stream; private final int[] jjrounds = new int[37]; private final int[] jjstateSet = new int[74]; protected char curChar; -public QueryParserTokenManager(CharStream stream){ +public QueryParserTokenManager(CharStream stream) +{ input_stream = stream; } -public QueryParserTokenManager(CharStream stream, int lexState){ +public QueryParserTokenManager(CharStream stream, int lexState) +{ this(stream); SwitchTo(lexState); }