Loading

Either re-interrupt this method or rethrow the "InterruptedException" that can be caught here

java interrup()函数会中断线程(本质更新线程为中断状态)。若sleep()函数检测到线程中断(interrupt()函数触发) 会抛 InterruptedException, 被catch住后线程中断状态更新为未中断

sonar检测到该问题会提示此种潜在逻辑,防止忽略该潜在风险而导致代码bug。

posted @ 2022-09-04 15:27  Acelin_H  阅读(140)  评论(0编辑  收藏  举报