[ https://issues.apache.org/jira/browse/LUCENE-5892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14100706#comment-14100706 ]
Uwe Schindler edited comment on LUCENE-5892 at 8/18/14 2:56 PM: ---------------------------------------------------------------- Maybe CharTermAttributeImpl should extend this class or wrap it somehow - and we move all stuff out of CharTermAttributeImpl (and just add Attribute-specific stuff)? There are also other things: remove IOException (you did that already, it is there for stuff like BufferedWriter that implement Appendable). Important is the following: Let the append methods use covariant return: {code:java} @Override public Appendable append(char c) { {code} should be: {code:java} @Override public CharsRefBuilder append(char c) { {code} Without the covariant return, the typical "chaining" is hard, because suddenly the builder changes its type. was (Author: thetaphi): Maybe CharTermAttributeImpl should extend this class? There are also other things: remove IOException (you did that already, it is there for stuff like BufferedWriter that implement Appendable). Important is the following: Let the append methods use covariant return: {code:java} @Override public Appendable append(char c) { {code} should be: {code:java} @Override public CharsRefBuilder append(char c) { {code} Without the covariant return, the typical "chaining" is hard, because suddenly the builder changes its type. > Make CharsRefBuilder implement Appendable > ----------------------------------------- > > Key: LUCENE-5892 > URL: https://issues.apache.org/jira/browse/LUCENE-5892 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Adrien Grand > Assignee: Adrien Grand > Priority: Minor > Fix For: 5.0, 4.10 > > Attachments: LUCENE-5892.patch > > -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org