lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: svn commit: r830456 - /lucene/java/trunk/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java
Date Wed, 28 Oct 2009 09:24:34 GMT
Thanks Uwe!

Mike

On Wed, Oct 28, 2009 at 4:01 AM,  <uschindler@apache.org> wrote:
> Author: uschindler
> Date: Wed Oct 28 08:01:55 2009
> New Revision: 830456
>
> URL: http://svn.apache.org/viewvc?rev=830456&view=rev
> Log:
> The variable was not used but initialized. This was caused by merge from 2.9, fixed to
use the final boolean.
>
> Modified:
>    lucene/java/trunk/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java
>
> Modified: lucene/java/trunk/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java
> URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java?rev=830456&r1=830455&r2=830456&view=diff
> ==============================================================================
> --- lucene/java/trunk/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java
(original)
> +++ lucene/java/trunk/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java
Wed Oct 28 08:01:55 2009
> @@ -70,7 +70,7 @@
>   public StandardAnalyzer(Version matchVersion, Set<?> stopWords) {
>     stopSet = stopWords;
>     setOverridesTokenStreamMethod(StandardAnalyzer.class);
> -    enableStopPositionIncrements = matchVersion.onOrAfter(Version.LUCENE_29);
> +    enableStopPositionIncrements = StopFilter.getEnablePositionIncrementsVersionDefault(matchVersion);
>     replaceInvalidAcronym = matchVersion.onOrAfter(Version.LUCENE_24);
>     this.matchVersion = matchVersion;
>   }
> @@ -95,13 +95,13 @@
>
>   /** Constructs a {@link StandardTokenizer} filtered by a {@link
>   StandardFilter}, a {@link LowerCaseFilter} and a {@link StopFilter}. */
> +  @Override
>   public TokenStream tokenStream(String fieldName, Reader reader) {
>     StandardTokenizer tokenStream = new StandardTokenizer(matchVersion, reader);
>     tokenStream.setMaxTokenLength(maxTokenLength);
>     TokenStream result = new StandardFilter(tokenStream);
>     result = new LowerCaseFilter(result);
> -    result = new StopFilter(StopFilter.getEnablePositionIncrementsVersionDefault(matchVersion),
> -                            result, stopSet);
> +    result = new StopFilter(enableStopPositionIncrements, result, stopSet);
>     return result;
>   }
>
> @@ -132,6 +132,7 @@
>     return maxTokenLength;
>   }
>
> +  @Override
>   public TokenStream reusableTokenStream(String fieldName, Reader reader) throws IOException
{
>     if (overridesTokenStreamMethod) {
>       // LUCENE-1678: force fallback to tokenStream() if we
> @@ -146,7 +147,7 @@
>       streams.tokenStream = new StandardTokenizer(matchVersion, reader);
>       streams.filteredTokenStream = new StandardFilter(streams.tokenStream);
>       streams.filteredTokenStream = new LowerCaseFilter(streams.filteredTokenStream);
> -      streams.filteredTokenStream = new StopFilter(StopFilter.getEnablePositionIncrementsVersionDefault(matchVersion),
> +      streams.filteredTokenStream = new StopFilter(enableStopPositionIncrements,
>                                                    streams.filteredTokenStream,
stopSet);
>     } else {
>       streams.tokenStream.reset(reader);
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message