Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-773

Use Map.entrySet and Map.values instead of multiple lookups from Map.keySet

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Fix Version/s: 0.6
    • Component/s: None
    • Labels:

      Description

      in a few places in the codebase there are loops on Map containers in which the values are read but the iteration is done on the keys with subsequent calls to map.get(key).

      Using entrySet/values instead of keySet should bear a little performance improvement in that kind of loops (10/30%, if I recall correctly) but mostly the patch just gets rid of a few more FindBugs warnings. All tests still passing

        Attachments

          Activity

            People

            • Assignee:
              riffraff gabriele renzi Assign to me
              Reporter:
              riffraff gabriele renzi
              Authors:
              gabriele renzi

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Issue deployment