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

Avoid redundant Hashtable.get call in Signal.handle

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P5 P5
    • 20
    • None
    • other-libs
    • b03

      In the method jdk.internal.misc.Signal#handle there is consecutive Hashtable.get+Hashtable.remove calls:

         Signal.Handler oldHandler = handlers.get(sig);
         handlers.remove(sig);

      Instead of separate Hashtable.get/remove calls we can just use value returned by remove.

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

              Created:
              Updated:
              Resolved: