You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/03/23 19:22:29 UTC

[GitHub] [lucene] uschindler commented on pull request #38: LUCENE-9856: Static analysis take 3: Remove redundant interfaces

uschindler commented on pull request #38:
URL: https://github.com/apache/lucene/pull/38#issuecomment-805169097


   The problem here is specific to BytesTermAttribute. In contrast CharTermAttribute does not have the issue:
   
   - TermToBytesRefAttribute defines getBytes()
   - Because BytesTermAttribute add setBytes() it also has getBytes(). So we decided to let it extend TermToBytesRefAttribute. 
   
   This is IMHO wrong. Attribute interfaces should not extend each other (separation of responsibilities). Both shoud declare getBytes() with same signature. Then compiler won't complain.
   
   P.S.: For the AppendGraphTokenFilter this was just copypasted. Here not even a test fails, as this is never tested with IndexWriter! We should add an indexing test!!!


-- 
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



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