Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8287181

Avoid redundant HashMap.containsKey calls in InternalLocaleBuilder.setExtension

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P5
    • 19
    • None
    • core-libs

    Description

      No need to separately perform HashMap.containsKey before HashMap.remove call. If key is present - it will be removed anyway. If it's not present, nothing will be deleted.

                      if (extensions != null && extensions.containsKey(key)) {
                          extensions.remove(key);
                      }

      Attachments

        Issue Links

          Activity

            People

              aturbanov Andrey Turbanov
              aturbanov Andrey Turbanov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: