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

Avoid redundant Hashtable.get call in Signal.handle

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: