Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-7773

Remove redundant addAll command in LuceneListIndexCommand

    XMLWordPrintableJSON

    Details

      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:

      LinkedHashSet<LuceneIndexDetails> uniqResults = new LinkedHashSet<>(sortedResults);

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mkevo Mario Kevo
                Reporter:
                jasonhuynh Jason Huynh
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m