[
https://issues.apache.org/jira/browse/GEODE-7773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jason Huynh updated GEODE-7773:
-------------------------------
Description:
The collection named uniqResults is instantiated and addAll is invoked with a
collection. Instead we can optimize and instantiate the uniqResults with the
collection as a parameter.
[https://github.com/apache/geode/blob/d5a191ec02bcff8ebfd090484b50a63ec9352f8e/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneListIndexCommand.java#L68]
The change would look similar to:
{code:java}
LinkedHashSet<LuceneIndexDetails> uniqResults = new
LinkedHashSet<>(sortedResults);{code}
was:
The collection named uniqResults is instantiated and addAll is invoked with a
collection. Instead we can optimize and instantiate the uniqResults with the
collection as a parameter.
[https://github.com/apache/geode/blob/d5a191ec02bcff8ebfd090484b50a63ec9352f8e/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneListIndexCommand.java#L68]
The change would look similar to:
{code:java}
LinkedHashSet<LuceneIndexDetails> uniqResults = new
LinkedHashSet<>(sortedResults);{code}
> Remove redundant addAll command in LuceneListIndexCommand
> ---------------------------------------------------------
>
> Key: GEODE-7773
> URL: https://issues.apache.org/jira/browse/GEODE-7773
> Project: Geode
> Issue Type: Task
> Components: gfsh, lucene
> Reporter: Jason Huynh
> Priority: Major
> Labels: beginner, newb, starter
>
> The collection named uniqResults is instantiated and addAll is invoked with
> a collection. Instead we can optimize and instantiate the uniqResults with
> the collection as a parameter.
> [https://github.com/apache/geode/blob/d5a191ec02bcff8ebfd090484b50a63ec9352f8e/geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/cli/LuceneListIndexCommand.java#L68]
>
> The change would look similar to:
> {code:java}
> LinkedHashSet<LuceneIndexDetails> uniqResults = new
> LinkedHashSet<>(sortedResults);{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)