lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uschind...@apache.org
Subject svn commit: r806990 - /lucene/java/trunk/contrib/analyzers/common/src/test/org/apache/lucene/analysis/th/TestThaiAnalyzer.java
Date Sun, 23 Aug 2009 16:35:50 GMT
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]);



Mime
View raw message