HBase
  1. HBase
  2. HBASE-1405

Threads.shutdown has unnecessary branch

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.20.0
    • Component/s: None
    • Labels:
      None

      Description

              if (joinwait == -1) {
                t.join();
              } else {
                t.join(joinwait);
              }
      

      We don't need to use -1 as a special value, as join already has a special value of 0:

      From Thread.join() javadoc:
      "Waits at most millis milliseconds for this thread to die. A timeout of 0 means to wait forever."

        Activity

        Hide
        stack added a comment -

        Thanks for patch Nitay.

        Show
        stack added a comment - Thanks for patch Nitay.

          People

          • Assignee:
            Nitay Joffe
            Reporter:
            Nitay Joffe
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development