Avoid redundant HashMap.containsKey calls in InternalLocaleBuilder.setExtension

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P5
    • 19
    • Affects Version/s: None
    • Component/s: 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);
                      }

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

              Created:
              Updated:
              Resolved: