Avoid redundant Hashtable.get call in Signal.handle

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P5
    • 20
    • Affects Version/s: None
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: