Github user jimczi commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/384#discussion_r191549169
  
    --- Diff: 
lucene/analysis/common/src/java/org/apache/lucene/analysis/miscellaneous/ConcatenateGraphFilter.java
 ---
    @@ -119,27 +147,19 @@ public boolean incrementToken() throws IOException {
     
       @Override
       public void end() throws IOException {
    -    super.end();
    -    if (finiteStrings == null) {
    -      inputTokenStream.end();
    -    }
    -  }
    -
    -  @Override
    -  public void close() throws IOException {
    -    if (finiteStrings == null) {
    -      inputTokenStream.close();
    -    }
    +    restoreState(endState);
       }
     
    +  //nocommit move method to before incrementToken
       @Override
       public void reset() throws IOException {
    -    super.reset();
    -    if (hasAttribute(CharTermAttribute.class)) {
    -      // we only create this if we really need it to safe the UTF-8 to 
UTF-16 conversion
    -      charTermAttribute = getAttribute(CharTermAttribute.class);
    --- End diff --
    
    The automaton should be created lazily on the first call to incrementToken 
like described in the comment above ;).


---

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

Reply via email to