You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2014/05/04 16:39:16 UTC
[jira] [Comment Edited] (LUCENE-5640) Cleanup Token class
[ https://issues.apache.org/jira/browse/LUCENE-5640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13988996#comment-13988996 ]
Uwe Schindler edited comment on LUCENE-5640 at 5/4/14 2:38 PM:
---------------------------------------------------------------
I think we should factor out the attribute stuff "non-token" from Token class and move it as class inbetween: o.a.l.analysis.tokenattributes.CombinedTokenAttributeImpl
Token is the just a subclass of this one and add the highlighter-needed crazy stuff. The basic impl is clean and straight-forward. Also we should remove FlagsAttribute from it and let only implement it in Token only (or nuke the whole attribute completely).
was (Author: thetaphi):
I think we should factor out the attribute stuff "non-token" from Token class and move it as class inbetween: o.a.l.analysis.tokenattributes.CombinedTokenAttributeImpl
Token is the just a subclass of this one and add the highlighter-needed crazy stuff. The basic impl is clean and straoght-forward. Also we should remove FlagsAttribute from it and let only implement it in Token.
> Cleanup Token class
> -------------------
>
> Key: LUCENE-5640
> URL: https://issues.apache.org/jira/browse/LUCENE-5640
> Project: Lucene - Core
> Issue Type: Sub-task
> Components: modules/analysis
> Reporter: Uwe Schindler
> Fix For: 4.9, 5.0
>
> Attachments: LUCENE-5640.patch
>
>
> We should remove code duplication in the Token class:
> - copy constructors
> - reinit() shit
> - non-default clone()
> This is too bugy. Most of the methods can be simply removed. In fact, Token should just look like a clone of all AttributeImpl it implements.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org