lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r831094 [3/8] - in /lucene/java/branches/flex_1458: ./ contrib/ contrib/analyzers/common/src/java/org/apache/lucene/analysis/br/ contrib/analyzers/common/src/java/org/apache/lucene/analysis/cz/ contrib/analyzers/common/src/java/org/apache/l...
Date Thu, 29 Oct 2009 21:29:56 GMT
Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharArraySet.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharArraySet.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharArraySet.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharArraySet.java Thu Oct 29 21:29:47 2009
@@ -32,7 +32,7 @@
  * is in the set without the necessity of converting it
  * to a String first.
  * <P>
- * <em>Please note:</em> This class implements {@link Set} but
+ * <em>Please note:</em> This class implements {@link java.util.Set Set} but
  * does not behave like it should in all cases. The generic type is
  * {@code Set<Object>}, because you can add any object to it,
  * that has a string representation. The add methods will use
@@ -223,14 +223,17 @@
   }
 
 
+  @Override
   public int size() {
     return count;
   }
 
+  @Override
   public boolean isEmpty() {
     return count==0;
   }
 
+  @Override
   public boolean contains(Object o) {
     if (o instanceof char[]) {
       final char[] text = (char[])o;
@@ -239,6 +242,7 @@
     return contains(o.toString());
   }
 
+  @Override
   public boolean add(Object o) {
     if (o instanceof char[]) {
       return add((char[])o);
@@ -309,6 +313,7 @@
   }
 
   /** returns an iterator of new allocated Strings, this method violates the Set interface */
+  @Override
   @SuppressWarnings("unchecked")
   public Iterator<Object> iterator() {
     return (Iterator) stringIterator();
@@ -328,22 +333,27 @@
       super(entries, ignoreCase, count);
     }
 
+    @Override
     public boolean add(Object o){
       throw new UnsupportedOperationException();
     }
     
+    @Override
     public boolean addAll(Collection<? extends Object> coll) {
       throw new UnsupportedOperationException();
     }
     
+    @Override
     public boolean add(char[] text) {
       throw new UnsupportedOperationException();
     }
 
+    @Override
     public boolean add(CharSequence text) {
       throw new UnsupportedOperationException();
     }
 
+    @Override
     public boolean add(String text) {
       throw new UnsupportedOperationException();
     }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharFilter.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharFilter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharFilter.java Thu Oct 29 21:29:47 2009
@@ -50,26 +50,32 @@
    * Chains the corrected offset through the input
    * CharFilter.
    */
+  @Override
   public final int correctOffset(int currentOff) {
     return input.correctOffset(correct(currentOff));
   }
 
+  @Override
   public void close() throws IOException {
     input.close();
   }
 
+  @Override
   public int read(char[] cbuf, int off, int len) throws IOException {
     return input.read(cbuf, off, len);
   }
 
+  @Override
   public boolean markSupported(){
     return input.markSupported();
   }
 
+  @Override
   public void mark( int readAheadLimit ) throws IOException {
     input.mark(readAheadLimit);
   }
 
+  @Override
   public void reset() throws IOException {
     input.reset();
   }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharReader.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharReader.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharReader.java Thu Oct 29 21:29:47 2009
@@ -39,26 +39,32 @@
     input = in;
   }
 
+  @Override
   public int correctOffset(int currentOff) {
     return currentOff;
   }
 
+  @Override
   public void close() throws IOException {
     input.close();
   }
 
+  @Override
   public int read(char[] cbuf, int off, int len) throws IOException {
     return input.read(cbuf, off, len);
   }
 
+  @Override
   public boolean markSupported(){
     return input.markSupported();
   }
 
+  @Override
   public void mark( int readAheadLimit ) throws IOException {
     input.mark(readAheadLimit);
   }
 
+  @Override
   public void reset() throws IOException {
     input.reset();
   }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharTokenizer.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharTokenizer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/CharTokenizer.java Thu Oct 29 21:29:47 2009
@@ -65,6 +65,7 @@
     return c;
   }
 
+  @Override
   public final boolean incrementToken() throws IOException {
     clearAttributes();
     int length = 0;
@@ -108,12 +109,14 @@
     return true;
   }
   
+  @Override
   public final void end() {
     // set final offset
     int finalOffset = correctOffset(offset);
     offsetAtt.setOffset(finalOffset, finalOffset);
   }
 
+  @Override
   public void reset(Reader input) throws IOException {
     super.reset(input);
     bufferIndex = 0;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/ISOLatin1AccentFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/ISOLatin1AccentFilter.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/ISOLatin1AccentFilter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/ISOLatin1AccentFilter.java Thu Oct 29 21:29:47 2009
@@ -41,6 +41,7 @@
   private int outputPos;
   private TermAttribute termAtt;
     
+  @Override
   public final boolean incrementToken() throws java.io.IOException {    
     if (input.incrementToken()) {
       final char[] buffer = termAtt.termBuffer();

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/KeywordAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/KeywordAnalyzer.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/KeywordAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/KeywordAnalyzer.java Thu Oct 29 21:29:47 2009
@@ -28,10 +28,12 @@
   public KeywordAnalyzer() {
     setOverridesTokenStreamMethod(KeywordAnalyzer.class);
   }
+  @Override
   public TokenStream tokenStream(String fieldName,
                                  final Reader reader) {
     return new KeywordTokenizer(reader);
   }
+  @Override
   public TokenStream reusableTokenStream(String fieldName,
                                          final Reader reader) throws IOException {
     if (overridesTokenStreamMethod) {

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/KeywordTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/KeywordTokenizer.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/KeywordTokenizer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/KeywordTokenizer.java Thu Oct 29 21:29:47 2009
@@ -62,6 +62,7 @@
     termAtt.resizeTermBuffer(bufferSize);    
   }
   
+  @Override
   public final boolean incrementToken() throws IOException {
     if (!done) {
       clearAttributes();
@@ -83,11 +84,13 @@
     return false;
   }
   
+  @Override
   public final void end() {
     // set final offset 
     offsetAtt.setOffset(finalOffset, finalOffset);
   }
 
+  @Override
   public void reset(Reader input) throws IOException {
     super.reset(input);
     this.done = false;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/LengthFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/LengthFilter.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/LengthFilter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/LengthFilter.java Thu Oct 29 21:29:47 2009
@@ -46,6 +46,7 @@
   /**
    * Returns the next input Token whose term() is the right len
    */
+  @Override
   public final boolean incrementToken() throws IOException {
     // return the first non-stop word found
     while (input.incrementToken()) {

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/LetterTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/LetterTokenizer.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/LetterTokenizer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/LetterTokenizer.java Thu Oct 29 21:29:47 2009
@@ -46,6 +46,7 @@
 
   /** Collects only characters which satisfy
    * {@link Character#isLetter(char)}.*/
+  @Override
   protected boolean isTokenChar(char c) {
     return Character.isLetter(c);
   }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/LowerCaseFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/LowerCaseFilter.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/LowerCaseFilter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/LowerCaseFilter.java Thu Oct 29 21:29:47 2009
@@ -32,6 +32,7 @@
 
   private TermAttribute termAtt;
   
+  @Override
   public final boolean incrementToken() throws IOException {
     if (input.incrementToken()) {
 

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/LowerCaseTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/LowerCaseTokenizer.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/LowerCaseTokenizer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/LowerCaseTokenizer.java Thu Oct 29 21:29:47 2009
@@ -49,6 +49,7 @@
   
   /** Converts char to lower case
    * {@link Character#toLowerCase(char)}.*/
+  @Override
   protected char normalize(char c) {
     return Character.toLowerCase(c);
   }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/MappingCharFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/MappingCharFilter.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/MappingCharFilter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/MappingCharFilter.java Thu Oct 29 21:29:47 2009
@@ -47,6 +47,7 @@
     this.normMap = normMap;
   }
 
+  @Override
   public int read() throws IOException {
     while(true) {
       if (replacement != null && charPointer < replacement.length()) {
@@ -116,6 +117,7 @@
     return result;
   }
 
+  @Override
   public int read(char[] cbuf, int off, int len) throws IOException {
     char[] tmp = new char[len];
     int l = input.read(tmp, 0, len);

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/PerFieldAnalyzerWrapper.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/PerFieldAnalyzerWrapper.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/PerFieldAnalyzerWrapper.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/PerFieldAnalyzerWrapper.java Thu Oct 29 21:29:47 2009
@@ -86,6 +86,7 @@
     analyzerMap.put(fieldName, analyzer);
   }
 
+  @Override
   public TokenStream tokenStream(String fieldName, Reader reader) {
     Analyzer analyzer = analyzerMap.get(fieldName);
     if (analyzer == null) {
@@ -95,6 +96,7 @@
     return analyzer.tokenStream(fieldName, reader);
   }
   
+  @Override
   public TokenStream reusableTokenStream(String fieldName, Reader reader) throws IOException {
     if (overridesTokenStreamMethod) {
       // LUCENE-1678: force fallback to tokenStream() if we
@@ -110,6 +112,7 @@
   }
   
   /** Return the positionIncrementGap from the analyzer assigned to fieldName */
+  @Override
   public int getPositionIncrementGap(String fieldName) {
     Analyzer analyzer = analyzerMap.get(fieldName);
     if (analyzer == null)
@@ -117,6 +120,7 @@
     return analyzer.getPositionIncrementGap(fieldName);
   }
   
+  @Override
   public String toString() {
     return "PerFieldAnalyzerWrapper(" + analyzerMap + ", default=" + defaultAnalyzer + ")";
   }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/PorterStemFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/PorterStemFilter.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/PorterStemFilter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/PorterStemFilter.java Thu Oct 29 21:29:47 2009
@@ -49,6 +49,7 @@
     termAtt = addAttribute(TermAttribute.class);
   }
 
+  @Override
   public final boolean incrementToken() throws IOException {
     if (!input.incrementToken())
       return false;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/PorterStemmer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/PorterStemmer.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/PorterStemmer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/PorterStemmer.java Thu Oct 29 21:29:47 2009
@@ -94,6 +94,7 @@
    * or a reference to the internal buffer can be retrieved by getResultBuffer
    * and getResultLength (which is generally more efficient.)
    */
+  @Override
   public String toString() { return new String(b,0,i); }
 
   /**

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/SimpleAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/SimpleAnalyzer.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/SimpleAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/SimpleAnalyzer.java Thu Oct 29 21:29:47 2009
@@ -24,10 +24,12 @@
  *  with {@link LowerCaseFilter} */
 
 public final class SimpleAnalyzer extends Analyzer {
+  @Override
   public TokenStream tokenStream(String fieldName, Reader reader) {
     return new LowerCaseTokenizer(reader);
   }
 
+  @Override
   public TokenStream reusableTokenStream(String fieldName, Reader reader) throws IOException {
     Tokenizer tokenizer = (Tokenizer) getPreviousTokenStream();
     if (tokenizer == null) {

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/StopAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/StopAnalyzer.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/StopAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/StopAnalyzer.java Thu Oct 29 21:29:47 2009
@@ -68,9 +68,7 @@
 
   /** Builds an analyzer with the stop words from the given set.
    * @param matchVersion See <a href="#version">above</a>
-   * @param stopWords Set of stop words
-   * @param enablePositionIncrements See {@link
-   * StopFilter#setEnablePositionIncrements} */
+   * @param stopWords Set of stop words */
   public StopAnalyzer(Version matchVersion, Set<?> stopWords) {
     this.stopWords = stopWords;
     enablePositionIncrements = StopFilter.getEnablePositionIncrementsVersionDefault(matchVersion);
@@ -95,6 +93,7 @@
   }
 
   /** Filters LowerCaseTokenizer with StopFilter. */
+  @Override
   public TokenStream tokenStream(String fieldName, Reader reader) {
     return new StopFilter(enablePositionIncrements, new LowerCaseTokenizer(reader), stopWords);
   }
@@ -104,6 +103,7 @@
     Tokenizer source;
     TokenStream result;
   };
+  @Override
   public TokenStream reusableTokenStream(String fieldName, Reader reader) throws IOException {
     SavedStreams streams = (SavedStreams) getPreviousTokenStream();
     if (streams == null) {

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/StopFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/StopFilter.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/StopFilter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/StopFilter.java Thu Oct 29 21:29:47 2009
@@ -54,7 +54,6 @@
    * @param input Input TokenStream
    * @param stopWords A Set of Strings or char[] or any other toString()-able set representing the stopwords
    * @param ignoreCase if true, all words are lower cased first
-   * @param ignoreCase -Ignore case when stopping.
    */
   public StopFilter(boolean enablePositionIncrements, TokenStream input, Set<?> stopWords, boolean ignoreCase)
   {
@@ -135,6 +134,7 @@
   /**
    * Returns the next input Token whose term() is not a stop word.
    */
+  @Override
   public final boolean incrementToken() throws IOException {
     // return the first non-stop word found
     int skippedPositions = 0;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/TeeSinkTokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/TeeSinkTokenFilter.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/TeeSinkTokenFilter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/TeeSinkTokenFilter.java Thu Oct 29 21:29:47 2009
@@ -53,7 +53,7 @@
 d.add(new Field("f3", final3));
 d.add(new Field("f4", final4));
  * </pre>
- * In this example, <code>sink1</code> and <code>sink2<code> will both get tokens from both
+ * In this example, <code>sink1</code> and <code>sink2</code> will both get tokens from both
  * <code>reader1</code> and <code>reader2</code> after whitespace tokenizer
  * and now we can further wrap any of these in extra analysis, and more "sources" can be inserted if desired.
  * It is important, that tees are consumed before sinks (in the above example, the field names must be
@@ -127,6 +127,7 @@
     while (incrementToken());
   }
   
+  @Override
   public boolean incrementToken() throws IOException {
     if (input.incrementToken()) {
       // capture state lazily - maybe no SinkFilter accepts this state
@@ -148,6 +149,7 @@
     return false;
   }
   
+  @Override
   public final void end() throws IOException {
     super.end();
     AttributeSource.State finalState = captureState();
@@ -204,6 +206,7 @@
       this.finalState = finalState;
     }
     
+    @Override
     public final boolean incrementToken() throws IOException {
       // lazy init the iterator
       if (it == null) {
@@ -219,18 +222,21 @@
       return true;
     }
   
+    @Override
     public final void end() throws IOException {
       if (finalState != null) {
         restoreState(finalState);
       }
     }
     
+    @Override
     public final void reset() {
       it = cachedStates.iterator();
     }
   }
     
   private static final SinkFilter ACCEPT_ALL_FILTER = new SinkFilter() {
+    @Override
     public boolean accept(AttributeSource source) {
       return true;
     }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/Token.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/Token.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/Token.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/Token.java Thu Oct 29 21:29:47 2009
@@ -37,7 +37,7 @@
   <p>
   The start and end offsets permit applications to re-associate a token with
   its source text, e.g., to display highlighted query terms in a document
-  browser, or to show matching text fragments in a KWIC (KeyWord In Context)
+  browser, or to show matching text fragments in a <abbr title="KeyWord In Context">KWIC</abbr>
   display, etc.
   <p>
   The type is a string, assigned by a lexical analyzer
@@ -59,9 +59,9 @@
   
   <br><br>
   
-  <p>Tokenizers and filters should try to re-use a Token
+  <p>Tokenizers and TokenFilters should try to re-use a Token
   instance when possible for best performance, by
-  implementing the {@link TokenStream#next(Token)} API.
+  implementing the {@link TokenStream#incrementToken()} API.
   Failing that, to create a new Token you should first use
   one of the constructors that starts with null text.  To load
   the token from a char[] use {@link #setTermBuffer(char[], int, int)}.
@@ -75,30 +75,30 @@
   set the length of the term text.  See <a target="_top"
   href="https://issues.apache.org/jira/browse/LUCENE-969">LUCENE-969</a>
   for details.</p>
-  <p>Typical reuse patterns:
+  <p>Typical Token reuse patterns:
   <ul>
-  <li> Copying text from a string (type is reset to #DEFAULT_TYPE if not specified):<br/>
+  <li> Copying text from a string (type is reset to {@link #DEFAULT_TYPE} if not specified):<br/>
   <pre>
     return reusableToken.reinit(string, startOffset, endOffset[, type]);
   </pre>
   </li>
-  <li> Copying some text from a string (type is reset to #DEFAULT_TYPE if not specified):<br/>
+  <li> Copying some text from a string (type is reset to {@link #DEFAULT_TYPE} if not specified):<br/>
   <pre>
     return reusableToken.reinit(string, 0, string.length(), startOffset, endOffset[, type]);
   </pre>
   </li>
   </li>
-  <li> Copying text from char[] buffer (type is reset to #DEFAULT_TYPE if not specified):<br/>
+  <li> Copying text from char[] buffer (type is reset to {@link #DEFAULT_TYPE} if not specified):<br/>
   <pre>
     return reusableToken.reinit(buffer, 0, buffer.length, startOffset, endOffset[, type]);
   </pre>
   </li>
-  <li> Copying some text from a char[] buffer (type is reset to #DEFAULT_TYPE if not specified):<br/>
+  <li> Copying some text from a char[] buffer (type is reset to {@link #DEFAULT_TYPE} if not specified):<br/>
   <pre>
     return reusableToken.reinit(buffer, start, end - start, startOffset, endOffset[, type]);
   </pre>
   </li>
-  <li> Copying from one one Token to another (type is reset to #DEFAULT_TYPE if not specified):<br/>
+  <li> Copying from one one Token to another (type is reset to {@link #DEFAULT_TYPE} if not specified):<br/>
   <pre>
     return reusableToken.reinit(source.termBuffer(), 0, source.termLength(), source.startOffset(), source.endOffset()[, source.type()]);
   </pre>
@@ -108,7 +108,7 @@
   <ul>
   <li>clear() initializes all of the fields to default values. This was changed in contrast to Lucene 2.4, but should affect no one.</li>
   <li>Because <code>TokenStreams</code> can be chained, one cannot assume that the <code>Token's</code> current type is correct.</li>
-  <li>The startOffset and endOffset represent the start and offset in the source text. So be careful in adjusting them.</li>
+  <li>The startOffset and endOffset represent the start and offset in the source text, so be careful in adjusting them.</li>
   <li>When caching a reusable token, clone it. When injecting a cached token into a stream that can be reset, clone it again.</li>
   </ul>
   </p>
@@ -487,6 +487,7 @@
     this.payload = payload;
   }
   
+  @Override
   public String toString() {
     StringBuilder sb = new StringBuilder();
     sb.append('(');
@@ -507,6 +508,7 @@
   /** Resets the term text, payload, flags, and positionIncrement,
    * startOffset, endOffset and token type to default.
    */
+  @Override
   public void clear() {
     payload = null;
     // Leave termBuffer to allow re-use
@@ -517,6 +519,7 @@
     type = DEFAULT_TYPE;
   }
 
+  @Override
   public Object clone() {
     Token t = (Token)super.clone();
     // Do a deep clone
@@ -544,6 +547,7 @@
     return t;
   }
 
+  @Override
   public boolean equals(Object obj) {
     if (obj == this)
       return true;
@@ -578,6 +582,7 @@
       return o1.equals(o2);
   }
 
+  @Override
   public int hashCode() {
     initTermBuffer();
     int code = termLength;
@@ -739,6 +744,7 @@
     payload =  prototype.payload;
   }
 
+  @Override
   public void copyTo(AttributeImpl target) {
     if (target instanceof Token) {
       final Token to = (Token) target;
@@ -780,11 +786,13 @@
       this.delegate = delegate;
     }
   
+    @Override
     public AttributeImpl createAttributeInstance(Class<? extends Attribute> attClass) {
       return attClass.isAssignableFrom(Token.class)
         ? new Token() : delegate.createAttributeInstance(attClass);
     }
     
+    @Override
     public boolean equals(Object other) {
       if (this == other) return true;
       if (other instanceof TokenAttributeFactory) {
@@ -794,6 +802,7 @@
       return false;
     }
     
+    @Override
     public int hashCode() {
       return delegate.hashCode() ^ 0x0a45aa31;
     }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/TokenFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/TokenFilter.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/TokenFilter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/TokenFilter.java Thu Oct 29 21:29:47 2009
@@ -19,15 +19,10 @@
 
 import java.io.IOException;
 
-/** A TokenFilter is a TokenStream whose input is another token stream.
+/** A TokenFilter is a TokenStream whose input is another TokenStream.
   <p>
-  This is an abstract class.
-  NOTE: subclasses must override 
-  {@link #incrementToken()} if the new TokenStream API is used
-  and {@link #next(Token)} or {@link #next()} if the old
-  TokenStream API is used.
-  <p>
-  See {@link TokenStream}
+  This is an abstract class; subclasses must override {@link #incrementToken()}.
+  @see TokenStream
   */
 public abstract class TokenFilter extends TokenStream {
   /** The source of tokens for this filter. */
@@ -42,16 +37,19 @@
   /** Performs end-of-stream operations, if any, and calls then <code>end()</code> on the
    * input TokenStream.<p/> 
    * <b>NOTE:</b> Be sure to call <code>super.end()</code> first when overriding this method.*/
+  @Override
   public void end() throws IOException {
     input.end();
   }
   
   /** Close the input TokenStream. */
+  @Override
   public void close() throws IOException {
     input.close();
   }
 
   /** Reset the filter as well as the input TokenStream. */
+  @Override
   public void reset() throws IOException {
     input.reset();
   }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/TokenStream.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/TokenStream.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/TokenStream.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/TokenStream.java Thu Oct 29 21:29:47 2009
@@ -31,14 +31,14 @@
  * A <code>TokenStream</code> enumerates the sequence of tokens, either from
  * {@link Field}s of a {@link Document} or from query text.
  * <p>
- * This is an abstract class. Concrete subclasses are:
+ * This is an abstract class; concrete subclasses are:
  * <ul>
  * <li>{@link Tokenizer}, a <code>TokenStream</code> whose input is a Reader; and
  * <li>{@link TokenFilter}, a <code>TokenStream</code> whose input is another
  * <code>TokenStream</code>.
  * </ul>
  * A new <code>TokenStream</code> API has been introduced with Lucene 2.9. This API
- * has moved from being {@link Token} based to {@link Attribute} based. While
+ * has moved from being {@link Token}-based to {@link Attribute}-based. While
  * {@link Token} still exists in 2.9 as a convenience class, the preferred way
  * to store the information of a {@link Token} is to use {@link AttributeImpl}s.
  * <p>
@@ -54,14 +54,14 @@
  * <li>Instantiation of <code>TokenStream</code>/{@link TokenFilter}s which add/get
  * attributes to/from the {@link AttributeSource}.
  * <li>The consumer calls {@link TokenStream#reset()}.
- * <li>the consumer retrieves attributes from the stream and stores local
- * references to all attributes it wants to access
- * <li>The consumer calls {@link #incrementToken()} until it returns false and
- * consumes the attributes after each call.
+ * <li>The consumer retrieves attributes from the stream and stores local
+ * references to all attributes it wants to access.
+ * <li>The consumer calls {@link #incrementToken()} until it returns false
+ * consuming the attributes after each call.
  * <li>The consumer calls {@link #end()} so that any end-of-stream operations
  * can be performed.
  * <li>The consumer calls {@link #close()} to release any resource when finished
- * using the <code>TokenStream</code>
+ * using the <code>TokenStream</code>.
  * </ol>
  * To make sure that filters and consumers know which attributes are available,
  * the attributes must be added during instantiation. Filters and consumers are
@@ -72,7 +72,7 @@
  * Javadoc.
  * <p>
  * Sometimes it is desirable to capture a current state of a <code>TokenStream</code>,
- * e.g. for buffering purposes (see {@link CachingTokenFilter},
+ * e.g., for buffering purposes (see {@link CachingTokenFilter},
  * {@link TeeSinkTokenFilter}). For this usecase
  * {@link AttributeSource#captureState} and {@link AttributeSource#restoreState}
  * can be used.
@@ -101,7 +101,7 @@
   }
   
   /**
-   * Consumers (ie {@link IndexWriter}) use this method to advance the stream to
+   * Consumers (i.e., {@link IndexWriter}) use this method to advance the stream to
    * the next token. Implementing classes must implement this method and update
    * the appropriate {@link AttributeImpl}s with the attributes of the next
    * token.

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/Tokenizer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/Tokenizer.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/Tokenizer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/Tokenizer.java Thu Oct 29 21:29:47 2009
@@ -24,20 +24,14 @@
 
 /** A Tokenizer is a TokenStream whose input is a Reader.
   <p>
-  This is an abstract class.
-  <p>
-  NOTE: subclasses must override 
-  {@link #incrementToken()} if the new TokenStream API is used
-  and {@link #next(Token)} or {@link #next()} if the old
-  TokenStream API is used.
+  This is an abstract class; subclasses must override {@link #incrementToken()}
   <p>
   NOTE: Subclasses overriding {@link #incrementToken()} must
   call {@link AttributeSource#clearAttributes()} before
   setting attributes.
-  Subclasses overriding {@link #next(Token)} must call
+  Subclasses overriding {@link #incrementToken()} must call
   {@link Token#clear()} before setting Token attributes. 
  */
-
 public abstract class Tokenizer extends TokenStream {
   /** The text source for this Tokenizer. */
   protected Reader input;
@@ -73,6 +67,7 @@
   }
   
   /** By default, closes the input Reader. */
+  @Override
   public void close() throws IOException {
     input.close();
   }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/WhitespaceAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/WhitespaceAnalyzer.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/WhitespaceAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/WhitespaceAnalyzer.java Thu Oct 29 21:29:47 2009
@@ -23,10 +23,12 @@
 /** An Analyzer that uses {@link WhitespaceTokenizer}. */
 
 public final class WhitespaceAnalyzer extends Analyzer {
+  @Override
   public TokenStream tokenStream(String fieldName, Reader reader) {
     return new WhitespaceTokenizer(reader);
   }
 
+  @Override
   public TokenStream reusableTokenStream(String fieldName, Reader reader) throws IOException {
     Tokenizer tokenizer = (Tokenizer) getPreviousTokenStream();
     if (tokenizer == null) {

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/WhitespaceTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/WhitespaceTokenizer.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/WhitespaceTokenizer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/WhitespaceTokenizer.java Thu Oct 29 21:29:47 2009
@@ -42,6 +42,7 @@
   
   /** Collects only characters which do not satisfy
    * {@link Character#isWhitespace(char)}.*/
+  @Override
   protected boolean isTokenChar(char c) {
     return !Character.isWhitespace(c);
   }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardAnalyzer.java Thu Oct 29 21:29:47 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);

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardFilter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardFilter.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardFilter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardFilter.java Thu Oct 29 21:29:47 2009
@@ -45,6 +45,7 @@
    * <p>Removes <tt>'s</tt> from the end of words.
    * <p>Removes dots from acronyms.
    */
+  @Override
   public final boolean incrementToken() throws java.io.IOException {
     if (!input.incrementToken()) {
       return false;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/standard/StandardTokenizer.java Thu Oct 29 21:29:47 2009
@@ -170,6 +170,7 @@
    *
    * @see org.apache.lucene.analysis.TokenStream#next()
    */
+  @Override
   public final boolean incrementToken() throws IOException {
     clearAttributes();
     int posIncr = 1;
@@ -207,6 +208,7 @@
     }
   }
   
+  @Override
   public final void end() {
     // set final offset
     int finalOffset = correctOffset(scanner.yychar() + scanner.yylength());
@@ -218,11 +220,13 @@
    *
    * @see org.apache.lucene.analysis.TokenStream#reset()
    */
+  @Override
   public void reset() throws IOException {
     super.reset();
     scanner.yyreset(input);
   }
 
+  @Override
   public void reset(Reader reader) throws IOException {
     super.reset(reader);
     reset();

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/FlagsAttributeImpl.java Thu Oct 29 21:29:47 2009
@@ -49,10 +49,12 @@
     this.flags = flags;
   }
   
+  @Override
   public void clear() {
     flags = 0;
   }
 
+  @Override
   public boolean equals(Object other) {
     if (this == other) {
       return true;
@@ -65,10 +67,12 @@
     return false;
   }
 
+  @Override
   public int hashCode() {
     return flags;
   }
   
+  @Override
   public void copyTo(AttributeImpl target) {
     FlagsAttribute t = (FlagsAttribute) target;
     t.setFlags(flags);

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/OffsetAttributeImpl.java Thu Oct 29 21:29:47 2009
@@ -55,11 +55,13 @@
   }
 
 
+  @Override
   public void clear() {
     startOffset = 0;
     endOffset = 0;
   }
   
+  @Override
   public boolean equals(Object other) {
     if (other == this) {
       return true;
@@ -73,12 +75,14 @@
     return false;
   }
 
+  @Override
   public int hashCode() {
     int code = startOffset;
     code = code * 31 + endOffset;
     return code;
   } 
   
+  @Override
   public void copyTo(AttributeImpl target) {
     OffsetAttribute t = (OffsetAttribute) target;
     t.setOffset(startOffset, endOffset);

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/PayloadAttributeImpl.java Thu Oct 29 21:29:47 2009
@@ -54,10 +54,12 @@
     this.payload = payload;
   }
   
+  @Override
   public void clear() {
     payload = null;
   }
 
+  @Override
   public Object clone()  {
     PayloadAttributeImpl clone = (PayloadAttributeImpl) super.clone();
     if (payload != null) {
@@ -66,6 +68,7 @@
     return clone;
   }
 
+  @Override
   public boolean equals(Object other) {
     if (other == this) {
       return true;
@@ -83,10 +86,12 @@
     return false;
   }
 
+  @Override
   public int hashCode() {
     return (payload == null) ? 0 : payload.hashCode();
   }
 
+  @Override
   public void copyTo(AttributeImpl target) {
     PayloadAttribute t = (PayloadAttribute) target;
     t.setPayload((payload == null) ? null : (Payload) payload.clone());

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/PositionIncrementAttributeImpl.java Thu Oct 29 21:29:47 2009
@@ -67,10 +67,12 @@
     return positionIncrement;
   }
 
+  @Override
   public void clear() {
     this.positionIncrement = 1;
   }
   
+  @Override
   public boolean equals(Object other) {
     if (other == this) {
       return true;
@@ -83,10 +85,12 @@
     return false;
   }
 
+  @Override
   public int hashCode() {
     return positionIncrement;
   }
   
+  @Override
   public void copyTo(AttributeImpl target) {
     PositionIncrementAttribute t = (PositionIncrementAttribute) target;
     t.setPositionIncrement(positionIncrement);

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/TermAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/TermAttributeImpl.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/TermAttributeImpl.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/TermAttributeImpl.java Thu Oct 29 21:29:47 2009
@@ -164,6 +164,7 @@
     termLength = length;
   }
 
+  @Override
   public int hashCode() {
     initTermBuffer();
     int code = termLength;
@@ -171,10 +172,12 @@
     return code;
   }
 
+  @Override
   public void clear() {
     termLength = 0;    
   }
 
+  @Override
   public Object clone() {
     TermAttributeImpl t = (TermAttributeImpl)super.clone();
     // Do a deep clone
@@ -184,6 +187,7 @@
     return t;
   }
   
+  @Override
   public boolean equals(Object other) {
     if (other == this) {
       return true;
@@ -207,11 +211,13 @@
     return false;
   }
 
+  @Override
   public String toString() {
     initTermBuffer();
     return "term=" + new String(termBuffer, 0, termLength);
   }
   
+  @Override
   public void copyTo(AttributeImpl target) {
     initTermBuffer();
     TermAttribute t = (TermAttribute) target;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/analysis/tokenattributes/TypeAttributeImpl.java Thu Oct 29 21:29:47 2009
@@ -47,10 +47,12 @@
     this.type = type;
   }
 
+  @Override
   public void clear() {
     type = DEFAULT_TYPE;    
   }
 
+  @Override
   public boolean equals(Object other) {
     if (other == this) {
       return true;
@@ -63,10 +65,12 @@
     return false;
   }
 
+  @Override
   public int hashCode() {
     return type.hashCode();
   }
   
+  @Override
   public void copyTo(AttributeImpl target) {
     TypeAttribute t = (TypeAttribute) target;
     t.setType(type);

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/AbstractField.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/AbstractField.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/AbstractField.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/AbstractField.java Thu Oct 29 21:29:47 2009
@@ -235,6 +235,7 @@
   }
 
   /** Prints a Field for human consumption. */
+  @Override
   public final String toString() {
     StringBuilder result = new StringBuilder();
     if (isStored) {

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/DateTools.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/DateTools.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/DateTools.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/DateTools.java Thu Oct 29 21:29:47 2009
@@ -246,6 +246,7 @@
       this.resolution = resolution;
     }
     
+    @Override
     public String toString() {
       return resolution;
     }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/Document.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/Document.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/Document.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/Document.java Thu Oct 29 21:29:47 2009
@@ -289,6 +289,7 @@
   }
   
   /** Prints the fields of a document for human consumption. */
+  @Override
   public final String toString() {
     StringBuilder buffer = new StringBuilder();
     buffer.append("Document<");

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/Field.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/Field.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/Field.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/document/Field.java Thu Oct 29 21:29:47 2009
@@ -43,12 +43,13 @@
      * stored.
      */
     YES {
+      @Override
       public boolean isStored() { return true; }
     },
 
     /** Do not store the field value in the index. */
-    NO
-    {
+    NO {
+      @Override
       public boolean isStored() { return false; }
     };
 
@@ -62,8 +63,11 @@
      * but one can still access its contents provided it is
      * {@link Field.Store stored}. */
     NO {
+      @Override
       public boolean isIndexed()  { return false; }
+      @Override
       public boolean isAnalyzed() { return false; }
+      @Override
       public boolean omitNorms()  { return true;  }   
     },
 
@@ -71,8 +75,11 @@
      * value through an Analyzer.  This is useful for
      * common text. */
     ANALYZED {
+      @Override
       public boolean isIndexed()  { return true;  }
+      @Override
       public boolean isAnalyzed() { return true;  }
+      @Override
       public boolean omitNorms()  { return false; }   	
     },
 
@@ -81,8 +88,11 @@
      * useful for unique Ids like product numbers.
      */
     NOT_ANALYZED {
+      @Override
       public boolean isIndexed()  { return true;  }
+      @Override
       public boolean isAnalyzed() { return false; }
+      @Override
       public boolean omitNorms()  { return false; }   	
     },
 
@@ -101,8 +111,11 @@
      * that field must be indexed with NOT_ANALYZED_NO_NORMS
      * from the beginning. */
     NOT_ANALYZED_NO_NORMS {
+      @Override
       public boolean isIndexed()  { return true;  }
+      @Override
       public boolean isAnalyzed() { return false; }
+      @Override
       public boolean omitNorms()  { return true;  }   	
     },
 
@@ -112,8 +125,11 @@
      *  {@link #NOT_ANALYZED_NO_NORMS} for what norms are
      *  and why you may want to disable them. */
     ANALYZED_NO_NORMS {
+      @Override
       public boolean isIndexed()  { return true;  }
+      @Override
       public boolean isAnalyzed() { return true;  }
+      @Override
       public boolean omitNorms()  { return true;  }   	
     };
 
@@ -156,17 +172,23 @@
     /** Do not store term vectors. 
      */
     NO {
-    	public boolean isStored()      { return false; }
-    	public boolean withPositions() { return false; }
-    	public boolean withOffsets()   { return false; }
+      @Override
+      public boolean isStored()      { return false; }
+      @Override
+      public boolean withPositions() { return false; }
+      @Override
+      public boolean withOffsets()   { return false; }
     },
     
     /** Store the term vectors of each document. A term vector is a list
      * of the document's terms and their number of occurrences in that document. */
     YES {
-    	public boolean isStored()      { return true;  }
-    	public boolean withPositions() { return false; }
-    	public boolean withOffsets()   { return false; }
+      @Override
+      public boolean isStored()      { return true;  }
+      @Override
+      public boolean withPositions() { return false; }
+      @Override
+      public boolean withOffsets()   { return false; }
     },
     
     /**
@@ -175,9 +197,12 @@
      * @see #YES
      */ 
     WITH_POSITIONS {
-    	public boolean isStored()      { return true;  }
-    	public boolean withPositions() { return true;  }
-    	public boolean withOffsets()   { return false; }
+      @Override
+      public boolean isStored()      { return true;  }
+      @Override
+      public boolean withPositions() { return true;  }
+      @Override
+      public boolean withOffsets()   { return false; }
     },
     
     /**
@@ -186,9 +211,12 @@
      * @see #YES
      */ 
     WITH_OFFSETS {
-    	public boolean isStored()      { return true;  }
-    	public boolean withPositions() { return false; }
-    	public boolean withOffsets()   { return true;  }
+      @Override
+      public boolean isStored()      { return true;  }
+      @Override
+      public boolean withPositions() { return false; }
+      @Override
+      public boolean withOffsets()   { return true;  }
     },
     
     /**
@@ -199,9 +227,12 @@
      * @see #WITH_OFFSETS
      */ 
     WITH_POSITIONS_OFFSETS {
-    	public boolean isStored()      { return true;  }
-    	public boolean withPositions() { return true;  }
-    	public boolean withOffsets()   { return true;  }
+      @Override
+      public boolean isStored()      { return true;  }
+      @Override
+      public boolean withPositions() { return true;  }
+      @Override
+      public boolean withOffsets()   { return true;  }
     };
 
     /** Get the best representation of a TermVector given the flags. */
@@ -209,7 +240,7 @@
 
       // If it is not stored, nothing else matters.
       if (!stored) {
-    	return TermVector.NO;
+        return TermVector.NO;
       }
 
       if (withOffsets) {
@@ -337,7 +368,7 @@
    * </ul> 
    */ 
   public Field(String name, String value, Store store, Index index, TermVector termVector) {
-	  this(name, true, value, store, index, termVector);
+    this(name, true, value, store, index, termVector);
   }
   
   /**

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ByteSliceReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ByteSliceReader.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ByteSliceReader.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ByteSliceReader.java Thu Oct 29 21:29:47 2009
@@ -66,6 +66,7 @@
     return upto + bufferOffset == endIndex;
   }
 
+  @Override
   public byte readByte() {
     assert !eof();
     assert upto <= limit;
@@ -117,6 +118,7 @@
     }
   }
 
+  @Override
   public void readBytes(byte[] b, int offset, int len) {
     while(len > 0) {
       final int numLeft = limit-upto;
@@ -135,9 +137,13 @@
     }
   }
 
+  @Override
   public long getFilePointer() {throw new RuntimeException("not implemented");}
+  @Override
   public long length() {throw new RuntimeException("not implemented");}
+  @Override
   public void seek(long pos) {throw new RuntimeException("not implemented");}
+  @Override
   public void close() {throw new RuntimeException("not implemented");}
 }
 

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/CompoundFileReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/CompoundFileReader.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/CompoundFileReader.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/CompoundFileReader.java Thu Oct 29 21:29:47 2009
@@ -107,6 +107,7 @@
         return fileName;
     }
 
+    @Override
     public synchronized void close() throws IOException {
         if (stream == null)
             throw new IOException("Already closed");
@@ -116,6 +117,7 @@
         stream = null;
     }
 
+    @Override
     public synchronized IndexInput openInput(String id)
     throws IOException
     {
@@ -123,6 +125,7 @@
       return openInput(id, readBufferSize);
     }
 
+    @Override
     public synchronized IndexInput openInput(String id, int readBufferSize)
     throws IOException
     {
@@ -137,28 +140,33 @@
     }
 
     /** Returns an array of strings, one for each file in the directory. */
+    @Override
     public String[] listAll() {
         String res[] = new String[entries.size()];
         return entries.keySet().toArray(res);
     }
 
     /** Returns true iff a file with the given name exists. */
+    @Override
     public boolean fileExists(String name) {
         return entries.containsKey(name);
     }
 
     /** Returns the time the compound file was last modified. */
+    @Override
     public long fileModified(String name) throws IOException {
         return directory.fileModified(fileName);
     }
 
     /** Set the modified time of the compound file to now. */
+    @Override
     public void touchFile(String name) throws IOException {
         directory.touchFile(fileName);
     }
 
     /** Not implemented
      * @throws UnsupportedOperationException */
+    @Override
     public void deleteFile(String name)
     {
         throw new UnsupportedOperationException();
@@ -173,6 +181,7 @@
 
     /** Returns the length of a file in the directory.
      * @throws IOException if the file does not exist */
+    @Override
     public long fileLength(String name)
     throws IOException
     {
@@ -184,6 +193,7 @@
 
     /** Not implemented
      * @throws UnsupportedOperationException */
+    @Override
     public IndexOutput createOutput(String name)
     {
         throw new UnsupportedOperationException();
@@ -191,6 +201,7 @@
 
     /** Not implemented
      * @throws UnsupportedOperationException */
+    @Override
     public Lock makeLock(String name)
     {
         throw new UnsupportedOperationException();
@@ -220,6 +231,7 @@
             this.length = length;
         }
         
+        @Override
         public Object clone() {
           CSIndexInput clone = (CSIndexInput)super.clone();
           clone.base = (IndexInput)base.clone();
@@ -234,6 +246,7 @@
          * @param offset the offset in the array to start storing bytes
          * @param len the number of bytes to read
          */
+        @Override
         protected void readInternal(byte[] b, int offset, int len)
         throws IOException
         {
@@ -248,13 +261,16 @@
          *  the next {@link #readInternal(byte[],int,int)} will occur.
          * @see #readInternal(byte[],int,int)
          */
+        @Override
         protected void seekInternal(long pos) {}
 
         /** Closes the stream to further operations. */
+        @Override
         public void close() throws IOException {
           base.close();
         }
 
+        @Override
         public long length() {
           return length;
         }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/ConcurrentMergeScheduler.java Thu Oct 29 21:29:47 2009
@@ -112,6 +112,7 @@
     }
   }
 
+  @Override
   public void close() {
     closed = true;
   }
@@ -146,11 +147,11 @@
     return count;
   }
 
+  @Override
   public void merge(IndexWriter writer)
     throws CorruptIndexException, IOException {
 
-    // TODO: enable this once we are on JRE 1.5
-    // assert !Thread.holdsLock(writer);
+    assert !Thread.holdsLock(writer);
 
     this.writer = writer;
 
@@ -275,6 +276,7 @@
       }
     }
 
+    @Override
     public void run() {
       
       // First time through the while loop we do the merge
@@ -324,6 +326,7 @@
       }
     }
 
+    @Override
     public String toString() {
       MergePolicy.OneMerge merge = getRunningMerge();
       if (merge == null)

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DirectoryReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DirectoryReader.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DirectoryReader.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DirectoryReader.java Thu Oct 29 21:29:47 2009
@@ -1565,6 +1565,7 @@
       }
     }
   
+    @Override
     public boolean next() throws IOException {
       for (int i=0; i<matchingSegments.length; i++) {
         LegacySegmentMergeInfo smi = matchingSegments[i];
@@ -1599,14 +1600,17 @@
       return true;
     }
   
+    @Override
     public Term term() {
       return term;
     }
   
+    @Override
     public int docFreq() {
       return docFreq;
     }
   
+    @Override
     public void close() throws IOException {
       queue.close();
     }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumers.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumers.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumers.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumers.java Thu Oct 29 21:29:47 2009
@@ -40,12 +40,14 @@
     this.two = two;
   }
 
+  @Override
   void setFieldInfos(FieldInfos fieldInfos) {
     super.setFieldInfos(fieldInfos);
     one.setFieldInfos(fieldInfos);
     two.setFieldInfos(fieldInfos);
   }
 
+  @Override
   public void flush(Map<DocFieldConsumerPerThread,Collection<DocFieldConsumerPerField>> threadsAndFields, SegmentWriteState state) throws IOException {
 
     Map oneThreadsAndFields = new HashMap();
@@ -78,6 +80,7 @@
     two.flush(twoThreadsAndFields, state);
   }
 
+  @Override
   public void closeDocStore(SegmentWriteState state) throws IOException {      
     try {
       one.closeDocStore(state);
@@ -86,6 +89,7 @@
     }
   }
 
+  @Override
   public void abort() {
     try {
       one.abort();
@@ -94,12 +98,14 @@
     }
   }
 
+  @Override
   public boolean freeRAM() {
     boolean any = one.freeRAM();
     any |= two.freeRAM();
     return any;
   }
 
+  @Override
   public DocFieldConsumerPerThread addThread(DocFieldProcessorPerThread docFieldProcessorPerThread) throws IOException {
     return new DocFieldConsumersPerThread(docFieldProcessorPerThread, this, one.addThread(docFieldProcessorPerThread), two.addThread(docFieldProcessorPerThread));
   }
@@ -133,10 +139,12 @@
     DocumentsWriter.DocWriter one;
     DocumentsWriter.DocWriter two;
 
+    @Override
     public long sizeInBytes() {
       return one.sizeInBytes() + two.sizeInBytes();
     }
 
+    @Override
     public void finish() throws IOException {
       try {
         try {
@@ -149,6 +157,7 @@
       }
     }
 
+    @Override
     public void abort() {
       try {
         try {

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumersPerField.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumersPerField.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumersPerField.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumersPerField.java Thu Oct 29 21:29:47 2009
@@ -32,11 +32,13 @@
     this.two = two;
   }
 
+  @Override
   public void processFields(Fieldable[] fields, int count) throws IOException {
     one.processFields(fields, count);
     two.processFields(fields, count);
   }
 
+  @Override
   public void abort() {
     try {
       one.abort();

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumersPerThread.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumersPerThread.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumersPerThread.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldConsumersPerThread.java Thu Oct 29 21:29:47 2009
@@ -34,11 +34,13 @@
     docState = docFieldProcessorPerThread.docState;
   }
 
+  @Override
   public void startDocument() throws IOException {
     one.startDocument();
     two.startDocument();
   }
 
+  @Override
   public void abort() {
     try {
       one.abort();
@@ -47,6 +49,7 @@
     }
   }
 
+  @Override
   public DocumentsWriter.DocWriter finishDocument() throws IOException {
     final DocumentsWriter.DocWriter oneDoc = one.finishDocument();
     final DocumentsWriter.DocWriter twoDoc = two.finishDocument();
@@ -65,6 +68,7 @@
     }
   }
 
+  @Override
   public DocFieldConsumerPerField addField(FieldInfo fi) {
     return new DocFieldConsumersPerField(this, one.addField(fi), two.addField(fi));
   }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldProcessor.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldProcessor.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldProcessor.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldProcessor.java Thu Oct 29 21:29:47 2009
@@ -45,11 +45,13 @@
     fieldsWriter = new StoredFieldsWriter(docWriter, fieldInfos);
   }
 
+  @Override
   public void closeDocStore(SegmentWriteState state) throws IOException {
     consumer.closeDocStore(state);
     fieldsWriter.closeDocStore(state);
   }
 
+  @Override
   public void flush(Collection<DocConsumerPerThread> threads, SegmentWriteState state) throws IOException {
 
     Map<DocFieldConsumerPerThread, Collection<DocFieldConsumerPerField>> childThreadsAndFields = new HashMap<DocFieldConsumerPerThread, Collection<DocFieldConsumerPerField>>();
@@ -70,15 +72,18 @@
     state.flushedFiles.add(fileName);
   }
 
+  @Override
   public void abort() {
     fieldsWriter.abort();
     consumer.abort();
   }
 
+  @Override
   public boolean freeRAM() {
     return consumer.freeRAM();
   }
 
+  @Override
   public DocConsumerPerThread addThread(DocumentsWriterThreadState threadState) throws IOException {
     return new DocFieldProcessorPerThread(threadState, this);
   }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldProcessorPerThread.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldProcessorPerThread.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldProcessorPerThread.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocFieldProcessorPerThread.java Thu Oct 29 21:29:47 2009
@@ -63,6 +63,7 @@
     fieldsWriter = docFieldProcessor.fieldsWriter.addThread(docState);
   }
 
+  @Override
   public void abort() {
     for(int i=0;i<fieldHash.length;i++) {
       DocFieldProcessorPerField field = fieldHash[i];
@@ -150,6 +151,7 @@
     hashMask = newHashMask;
   }
 
+  @Override
   public DocumentsWriter.DocWriter processDocument() throws IOException {
 
     consumer.startDocument();
@@ -353,10 +355,12 @@
     DocumentsWriter.DocWriter one;
     DocumentsWriter.DocWriter two;
 
+    @Override
     public long sizeInBytes() {
       return one.sizeInBytes() + two.sizeInBytes();
     }
 
+    @Override
     public void finish() throws IOException {
       try {
         try {
@@ -369,6 +373,7 @@
       }
     }
 
+    @Override
     public void abort() {
       try {
         try {

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocInverter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocInverter.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocInverter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocInverter.java Thu Oct 29 21:29:47 2009
@@ -39,12 +39,14 @@
     this.endConsumer = endConsumer;
   }
 
+  @Override
   void setFieldInfos(FieldInfos fieldInfos) {
     super.setFieldInfos(fieldInfos);
     consumer.setFieldInfos(fieldInfos);
     endConsumer.setFieldInfos(fieldInfos);
   }
 
+  @Override
   void flush(Map<DocFieldConsumerPerThread, Collection<DocFieldConsumerPerField>> threadsAndFields, SegmentWriteState state) throws IOException {
 
     Map<InvertedDocConsumerPerThread,Collection<InvertedDocConsumerPerField>> childThreadsAndFields = new HashMap<InvertedDocConsumerPerThread,Collection<InvertedDocConsumerPerField>>();
@@ -71,20 +73,24 @@
     endConsumer.flush(endChildThreadsAndFields, state);
   }
 
+  @Override
   public void closeDocStore(SegmentWriteState state) throws IOException {
     consumer.closeDocStore(state);
     endConsumer.closeDocStore(state);
   }
 
+  @Override
   void abort() {
     consumer.abort();
     endConsumer.abort();
   }
 
+  @Override
   public boolean freeRAM() {
     return consumer.freeRAM();
   }
 
+  @Override
   public DocFieldConsumerPerThread addThread(DocFieldProcessorPerThread docFieldProcessorPerThread) {
     return new DocInverterPerThread(docFieldProcessorPerThread, this);
   }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocInverterPerField.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocInverterPerField.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocInverterPerField.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocInverterPerField.java Thu Oct 29 21:29:47 2009
@@ -51,11 +51,13 @@
     this.endConsumer = perThread.endConsumer.addField(this, fieldInfo);
   }
 
+  @Override
   void abort() {
     consumer.abort();
     endConsumer.abort();
   }
 
+  @Override
   public void processFields(final Fieldable[] fields,
                             final int count) throws IOException {
 
@@ -82,8 +84,8 @@
         if (!field.isTokenized()) {		  // un-tokenized field
           String stringValue = field.stringValue();
           final int valueLength = stringValue.length();
-          perThread.singleTokenTokenStream.reinit(stringValue, 0, valueLength);
-          fieldState.attributeSource = perThread.singleTokenTokenStream;
+          perThread.singleToken.reinit(stringValue, 0, valueLength);
+          fieldState.attributeSource = perThread.singleToken;
           consumer.start(field);
 
           boolean success = false;

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocInverterPerThread.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocInverterPerThread.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocInverterPerThread.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocInverterPerThread.java Thu Oct 29 21:29:47 2009
@@ -19,7 +19,7 @@
 
 import java.io.IOException;
 
-import org.apache.lucene.analysis.TokenStream;
+import org.apache.lucene.util.AttributeSource;
 import org.apache.lucene.analysis.tokenattributes.OffsetAttribute;
 import org.apache.lucene.analysis.tokenattributes.TermAttribute;
 
@@ -31,14 +31,13 @@
   final DocInverter docInverter;
   final InvertedDocConsumerPerThread consumer;
   final InvertedDocEndConsumerPerThread endConsumer;
-  //TODO: change to SingleTokenTokenStream after Token was removed
-  final SingleTokenTokenStream singleTokenTokenStream = new SingleTokenTokenStream();
+  final SingleTokenAttributeSource singleToken = new SingleTokenAttributeSource();
   
-  static class SingleTokenTokenStream extends TokenStream {
-    TermAttribute termAttribute;
-    OffsetAttribute offsetAttribute;
+  static class SingleTokenAttributeSource extends AttributeSource {
+    final TermAttribute termAttribute;
+    final OffsetAttribute offsetAttribute;
     
-    SingleTokenTokenStream() {
+    private SingleTokenAttributeSource() {
       termAttribute = addAttribute(TermAttribute.class);
       offsetAttribute = addAttribute(OffsetAttribute.class);
     }
@@ -47,11 +46,6 @@
       termAttribute.setTermBuffer(stringValue);
       offsetAttribute.setOffset(startOffset, endOffset);
     }
-    
-    // this is a dummy, to not throw an UOE because this class does not implement any iteration method
-    public boolean incrementToken() {
-      throw new UnsupportedOperationException();
-    }
   }
   
   final DocumentsWriter.DocState docState;
@@ -68,11 +62,13 @@
     endConsumer = docInverter.endConsumer.addThread(this);
   }
 
+  @Override
   public void startDocument() throws IOException {
     consumer.startDocument();
     endConsumer.startDocument();
   }
 
+  @Override
   public DocumentsWriter.DocWriter finishDocument() throws IOException {
     // TODO: allow endConsumer.finishDocument to also return
     // a DocWriter
@@ -80,6 +76,7 @@
     return consumer.finishDocument();
   }
 
+  @Override
   void abort() {
     try {
       consumer.abort();
@@ -88,6 +85,7 @@
     }
   }
 
+  @Override
   public DocFieldConsumerPerField addField(FieldInfo fi) {
     return new DocInverterPerField(this, fi);
   }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocumentsWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocumentsWriter.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocumentsWriter.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/DocumentsWriter.java Thu Oct 29 21:29:47 2009
@@ -183,6 +183,7 @@
   
   static final IndexingChain DefaultIndexingChain = new IndexingChain() {
 
+    @Override
     DocConsumer getChain(DocumentsWriter documentsWriter) {
       /*
       This is the current indexing chain:
@@ -1123,10 +1124,13 @@
   }
 
   private static class SkipDocWriter extends DocWriter {
+    @Override
     void finish() {
     }
+    @Override
     void abort() {
     }
+    @Override
     long sizeInBytes() {
       return 0;
     }
@@ -1184,6 +1188,7 @@
     ArrayList<byte[]> freeByteBlocks = new ArrayList<byte[]>();
     
     /* Allocate another byte[] from the shared pool */
+    @Override
     byte[] getByteBlock(boolean trackAllocations) {
       synchronized(DocumentsWriter.this) {
         final int size = freeByteBlocks.size();
@@ -1207,6 +1212,7 @@
     }
 
     /* Return byte[]'s to the pool */
+    @Override
     void recycleByteBlocks(byte[][] blocks, int start, int end) {
       synchronized(DocumentsWriter.this) {
         for(int i=start;i<end;i++)

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldInfo.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldInfo.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldInfo.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldInfo.java Thu Oct 29 21:29:47 2009
@@ -62,6 +62,7 @@
     }
   }
 
+  @Override
   public Object clone() {
     return new FieldInfo(name, isIndexed, number, storeTermVector, storePositionWithTermVector,
                          storeOffsetWithTermVector, omitNorms, storePayloads, omitTermFreqAndPositions);

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldInfos.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldInfos.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldInfos.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldInfos.java Thu Oct 29 21:29:47 2009
@@ -99,6 +99,7 @@
   /**
    * Returns a deep clone of this FieldInfos instance.
    */
+  @Override
   synchronized public Object clone() {
     FieldInfos fis = new FieldInfos();
     final int numField = byNumber.size();

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldSortedTermVectorMapper.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldSortedTermVectorMapper.java?rev=831094&r1=831093&r2=831094&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldSortedTermVectorMapper.java (original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/FieldSortedTermVectorMapper.java Thu Oct 29 21:29:47 2009
@@ -43,11 +43,13 @@
     this.comparator = comparator;
   }
 
+  @Override
   public void map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) {
     TermVectorEntry entry = new TermVectorEntry(currentField, term, frequency, offsets, positions);
     currentSet.add(entry);
   }
 
+  @Override
   public void setExpectations(String field, int numTerms, boolean storeOffsets, boolean storePositions) {
     currentSet = new TreeSet<TermVectorEntry>(comparator);
     currentField = field;



Mime
View raw message