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

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

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

@SuppressWarnings("InfiniteLoopStatement")
public void run() {
    ...
}
原文地址:https://www.cnblogs.com/yoyotl/p/11025700.html