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

Remove unnecessary Map.get from AWTAutoShutdown.unregisterPeer

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P5 P5
    • 26
    • None
    • client-libs
    • b03

          if (peerMap.get(target) == peer) {
              peerMap.remove(target);
              notifyPeerMapUpdated();
          }

      Instead of separate get+remove calls we can use Map.remove(Key,Value) instead.
      peerMap is an IdentityHashMap, so semantic is the same.

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

              Created:
              Updated:
              Resolved: