Open asfimport opened 8 years ago
ASF subversion and git services (migrated from JIRA)
Commit 7362c4ce603d81f276a83070e51bda52c3528bd7 in lucene-solr's branch refs/heads/master from Dawid Weiss https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=7362c4c
LUCENE-6831: start removing LinkedList in favor of ArrayList or De/Queues (#1969)
I'm committing it in, seems like a trivial thing.
ASF subversion and git services (migrated from JIRA)
Commit 7362c4ce603d81f276a83070e51bda52c3528bd7 in lucene-solr's branch refs/heads/jira/SOLR-14776 from Dawid Weiss https://gitbox.apache.org/repos/asf?p=lucene-solr.git;h=7362c4c
LUCENE-6831: start removing LinkedList in favor of ArrayList or De/Queues (#1969)
I'm committing it in, seems like a trivial thing.
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.Migrated from LUCENE-6831 by Dawid Weiss (@dweiss), updated Oct 13 2020 Pull requests: https://github.com/apache/lucene-solr/pull/1969, https://github.com/apache/lucene-solr/pull/1969