lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hoss...@apache.org
Subject svn commit: r949472 - in /lucene/solr/branches/branch-1.4: ./ CHANGES.txt src/java/org/apache/solr/analysis/BufferedTokenStream.java src/test/org/apache/solr/analysis/TestBufferedTokenStream.java
Date Sun, 30 May 2010 04:40:11 GMT
Author: hossman
Date: Sun May 30 04:40:10 2010
New Revision: 949472

URL: http://svn.apache.org/viewvc?rev=949472&view=rev
Log:
merging r891889 from solr/branches/branch-1.5-dev for SOLR-1662

Modified:
    lucene/solr/branches/branch-1.4/   (props changed)
    lucene/solr/branches/branch-1.4/CHANGES.txt
    lucene/solr/branches/branch-1.4/src/java/org/apache/solr/analysis/BufferedTokenStream.java
    lucene/solr/branches/branch-1.4/src/test/org/apache/solr/analysis/TestBufferedTokenStream.java

Propchange: lucene/solr/branches/branch-1.4/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun May 30 04:40:10 2010
@@ -1 +1 @@
-/lucene/solr/trunk:881642,881906,883566,891596
+/lucene/solr/trunk:881642,881906,883566,891596,891889

Modified: lucene/solr/branches/branch-1.4/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/branches/branch-1.4/CHANGES.txt?rev=949472&r1=949471&r2=949472&view=diff
==============================================================================
--- lucene/solr/branches/branch-1.4/CHANGES.txt (original)
+++ lucene/solr/branches/branch-1.4/CHANGES.txt Sun May 30 04:40:10 2010
@@ -62,6 +62,9 @@ Bug Fixes
 * SOLR-1660: CapitalizationFilter crashes if you use the maxWordCountOption
   (Robert Muir via shalin)
 
+* SOLR-1662: Added Javadocs in BufferedTokenStream and fixed incorrect cloning
+  in TestBufferedTokenStream (Robert Muir, Uwe Schindler via shalin)
+
 ================== Release 1.4.0 ==================
 Release Date:  See http://lucene.apache.org/solr for the official release date.
 

Modified: lucene/solr/branches/branch-1.4/src/java/org/apache/solr/analysis/BufferedTokenStream.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/branch-1.4/src/java/org/apache/solr/analysis/BufferedTokenStream.java?rev=949472&r1=949471&r2=949472&view=diff
==============================================================================
--- lucene/solr/branches/branch-1.4/src/java/org/apache/solr/analysis/BufferedTokenStream.java
(original)
+++ lucene/solr/branches/branch-1.4/src/java/org/apache/solr/analysis/BufferedTokenStream.java
Sun May 30 04:40:10 2010
@@ -46,13 +46,16 @@ import java.util.LinkedList;
  *   public MyTokenStream(TokenStream input) {super(input);}
  *   protected Token process(Token t) throws IOException {
  *     if ("A".equals(t.termText()) && "B".equals(peek(1).termText()))
- *       write(t);
+ *       write((Token)t.clone());
  *     return t;
  *   }
  * }
  * </pre>
  *
- *
+ * NOTE: BufferedTokenStream does not clone() any Tokens. This is instead the 
+ * responsibility of the implementing subclass. In the "A" "B" => "A" "A" "B"
+ * example above, the subclass must clone the additional "A" it creates.
+ * 
  * @version $Id$
  */
 public abstract class BufferedTokenStream extends TokenFilter {

Modified: lucene/solr/branches/branch-1.4/src/test/org/apache/solr/analysis/TestBufferedTokenStream.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/branch-1.4/src/test/org/apache/solr/analysis/TestBufferedTokenStream.java?rev=949472&r1=949471&r2=949472&view=diff
==============================================================================
--- lucene/solr/branches/branch-1.4/src/test/org/apache/solr/analysis/TestBufferedTokenStream.java
(original)
+++ lucene/solr/branches/branch-1.4/src/test/org/apache/solr/analysis/TestBufferedTokenStream.java
Sun May 30 04:40:10 2010
@@ -50,7 +50,7 @@ public class TestBufferedTokenStream ext
     protected Token process(Token t) throws IOException {
       if ("A".equals(new String(t.termBuffer(), 0, t.termLength())) && 
           "B".equals(new String(peek(1).termBuffer(), 0, peek(1).termLength())))
-        write(t);
+        write((Token)t.clone());
       return t;
     }
   }



Mime
View raw message