Avoid redundant HashMap.get to obtain old value in Toolkit.setDesktopProperty

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P5
    • 25
    • Affects Version/s: None
    • Component/s: client-libs
    • b23

              synchronized (this) {
                  oldValue = desktopProperties.get(name);
                  desktopProperties.put(name, newValue);
              }

      To obtain previous value of HashMap we can use result of desktopProperties.put call. In this case we can avoid redundant HashMap.get call.

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

              Created:
              Updated:
              Resolved: