You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by us...@apache.org on 2009/08/23 18:35:50 UTC

svn commit: r806990 - /lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/th/TestThaiAnalyzer.java

Author: uschindler
Date: Sun Aug 23 16:35:50 2009
New Revision: 806990

URL: http://svn.apache.org/viewvc?rev=806990&view=rev
Log:
LUCENE-1825: Another one :(

Modified:
    lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/th/TestThaiAnalyzer.java

Modified: lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/th/TestThaiAnalyzer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/th/TestThaiAnalyzer.java?rev=806990&r1=806989&r2=806990&view=diff
==============================================================================
--- lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/th/TestThaiAnalyzer.java (original)
+++ lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/th/TestThaiAnalyzer.java Sun Aug 23 16:35:50 2009
@@ -76,9 +76,9 @@
 		throws Exception {
 
 		TokenStream ts = a.tokenStream("dummy", new StringReader(input));
-		TermAttribute termAtt = (TermAttribute) ts.getAttribute(TermAttribute.class);
-		OffsetAttribute offsetAtt = (OffsetAttribute) ts.getAttribute(OffsetAttribute.class);
-		TypeAttribute typeAtt = (TypeAttribute) ts.getAttribute(TypeAttribute.class);
+		TermAttribute termAtt = (TermAttribute) ts.addAttribute(TermAttribute.class);
+		OffsetAttribute offsetAtt = (OffsetAttribute) ts.addAttribute(OffsetAttribute.class);
+		TypeAttribute typeAtt = (TypeAttribute) ts.addAttribute(TypeAttribute.class);
 		for (int i = 0; i < output.length; i++) {
 			assertTrue(ts.incrementToken());
 			assertEquals(termAtt.term(), output[i]);
@@ -98,11 +98,11 @@
 
       TokenStream ts = a.reusableTokenStream("dummy", new StringReader(input));
       TermAttribute termAtt = (TermAttribute) ts
-        .getAttribute(TermAttribute.class);
+        .addAttribute(TermAttribute.class);
       OffsetAttribute offsetAtt = (OffsetAttribute) ts
-        .getAttribute(OffsetAttribute.class);
+        .addAttribute(OffsetAttribute.class);
       TypeAttribute typeAtt = (TypeAttribute) ts
-        .getAttribute(TypeAttribute.class);
+        .addAttribute(TypeAttribute.class);
       for (int i = 0; i < output.length; i++) {
         assertTrue(ts.incrementToken());
         assertEquals(termAtt.term(), output[i]);