Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-8975

Code Cleanup: Use entryset for map iteration wherever possible.

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 8.2
    • Fix Version/s: 8.3
    • Component/s: None
    • Labels:
      None

      Description

      Simple, non-important code cleanup.

      Again, to clarify, please don't bother yourself with this ticket on company time, on personal time you could be working on something that makes you money or improves the product for your feature personally.

       

      This entire ticket is an afterthough. A look back at the code base that most people don't have the time for.

       

      ================

       

      While true that using `entrySet()` is really only an improvement for traversing a TreeMap(at least that's how it was in JDK8), it's a good practice in general to use it over keySet(), if you then use that keyset to do an extra lookup to get the value as well as the key.

       

      So that's what this ticket is.

       

      All changes were done automatically via Intellij's built-in code analysis.

       

      Putting this on LUCENE because code both in lucene and solr was changed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                KoenDG Koen De Groote
              • Votes:
                0 Vote for this issue
                Watchers:
                2 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 - 40m
                  40m