[
https://issues.apache.org/jira/browse/LUCENE-5640?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989400#comment-13989400
]
Robert Muir commented on LUCENE-5640:
-------------------------------------
This is not really code duplication though, its the difference between doing
something basic (like creating a new POJO in the old-fashioned way), and doing
something complicated (like new untested MethodHandle/invokedynamic/etc/etc).
One of these has been around for a while and we know how it behaves, the other
has not.
The attributes are thousands of lines of very complicated code:
WeakHashMaps/SoftReferences/Reflection,etc. I'm only saying, if you can add
those 3 lines so we don't get slower, that seems like a no brainer.
> 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, LUCENE-5640.patch, LUCENE-5640.patch,
> LUCENE-5640.patch, 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: [email protected]
For additional commands, e-mail: [email protected]