You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by GitBox <gi...@apache.org> on 2019/07/16 09:43:48 UTC

[GitHub] [lucene-solr] jpountz commented on a change in pull request #786: LUCENE-8916: GraphTokenStreamFiniteStrings preserves all incoming attributes

jpountz commented on a change in pull request #786: LUCENE-8916: GraphTokenStreamFiniteStrings preserves all incoming attributes
URL: https://github.com/apache/lucene-solr/pull/786#discussion_r303816286
 
 

 ##########
 File path: lucene/core/src/test/org/apache/lucene/util/graph/TestGraphTokenStreamFiniteStrings.java
 ##########
 @@ -44,13 +48,13 @@ private void assertTokenStream(TokenStream ts, String[] terms, int[] increments)
     assertNotNull(terms);
     assertNotNull(increments);
     assertEquals(terms.length, increments.length);
-    BytesTermAttribute termAtt = ts.getAttribute(BytesTermAttribute.class);
+    CharTermAttribute termAtt = ts.getAttribute(CharTermAttribute.class);
     PositionIncrementAttribute incrAtt = ts.getAttribute(PositionIncrementAttribute.class);
     int offset = 0;
     while (ts.incrementToken()) {
       // verify term and increment
       assert offset < terms.length;
-      assertEquals(terms[offset], termAtt.getBytesRef().utf8ToString());
+      assertEquals(terms[offset], termAtt.toString());
 
 Review comment:
   Was this change necessary, it should be equivalent right?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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