Intellij idea 告警:'while' statement cannot complete without throwing an exception

有时候这个告警是多余的,例如我们手写的监控线程。

如果有消除告警强迫症。在线程的执行方法上加入注解。

@SuppressWarnings("InfiniteLoopStatement")
public void run() {
    ...
}

 

posted @ 2019-06-14 22:10  一沙世界  阅读(8359)  评论(0编辑  收藏  举报