重新中断此方法或重新引发“ InterruptedException e”

时间:2018-12-23 16:41:18

标签: java

Sonarqube在这两个代码点中检测到此类型的错误(重新中断此方法或重新抛出“ InterruptedException”)。建议如何解决? 谢谢

try {
 Thread.sleep(settleDownMillis);
} catch (InterruptedException e) {

}

--------------------------------------
} catch (InterruptedException e) {
if (!shutdown) {
  log.error("Unexpected thread interrupt (maybe you are shutting down Maven?)", e);

}
break;

0 个答案:

没有答案