Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-1405

Threads.shutdown has unnecessary branch

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: 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."

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: