You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Dawid Weiss (JIRA)" <ji...@apache.org> on 2015/10/07 09:15:27 UTC
[jira] [Updated] (LUCENE-6831) Review LinkedList usage
[ https://issues.apache.org/jira/browse/LUCENE-6831?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dawid Weiss updated LUCENE-6831:
--------------------------------
Description:
I quickly scanned the code (out of curiosity) and most of the use cases of LinkedList are as a Queue, in which case indeed an ArrayDeque would be a better choice, especially if the maximum size is known in advance.
There are also some invalid/ incorrect uses like calling size() on a linked list in {{MultiPhraseQueryNodeBuilder}}, which should be fixed.
> Review LinkedList usage
> -----------------------
>
> Key: LUCENE-6831
> URL: https://issues.apache.org/jira/browse/LUCENE-6831
> Project: Lucene - Core
> Issue Type: Task
> Reporter: Dawid Weiss
> Assignee: Dawid Weiss
> Priority: Trivial
> Fix For: Trunk
>
>
> I quickly scanned the code (out of curiosity) and most of the use cases of LinkedList are as a Queue, in which case indeed an ArrayDeque would be a better choice, especially if the maximum size is known in advance.
> There are also some invalid/ incorrect uses like calling size() on a linked list in {{MultiPhraseQueryNodeBuilder}}, which should be fixed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org