title: Is it ever a safe to always ignore InterruptedException calling Thread sleep() in Java
body: <p>While working on a project I came across this code intended for a production system:</p>
  
  <pre><code>public static void sleepUntil(long millisecondToWake) {
      while (true) {
          long currentMillisecond = System.currentTimeMillis();
          if (currentMillisecond &gt;= millisecondToWake) {
              break;
          }
          try {
              Thread.sleep(millisecondToWake - currentMillisecond);
          }
          catch (InterruptedException ignoredException) {
              // do nothing
          }
      }
  }
  </code></pre>
  
  <p>I've always stuck to the basic principle of never dropping exceptions as exposed by Joshua Bloch in Effective Java as well as supported with my own extensive experience having to debug code where someone else did drop an exception. To date, I have not found a case where it is a good idea (sometimes catching  checked exception and throwing an runtime is debatably reasonable but I am not talking about those cases here). </p>
  
  <p>Thanks in advance for any comments. </p>