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

Avoid redundant HashMap.containsKey calls in InternalLocaleBuilder.setExtension

XMLWordPrintable

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

      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);
                      }

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

              Created:
              Updated:
              Resolved: