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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]