for
, while
,
or do
statements that
can only exit by throwing an exception. While such statements may be correct, they
often happen due to coding errors.
Example:
for (;;) { }
Use the Ignore when placed in Thread.run option to ignore the
infinite loop statements inside Thread.run
.
It may be useful for the daemon threads.
Example:
new Thread(() -> { while (true) { } }).start();