I have a Java code as follows
try {
while (true) {
// do something without break but will throw an expected
// exception in some random iteration of the loop
}
} catch (Exception e) {
// handled properly
}
This is reported by Sonar to be a Blocker Bug
, description as mentioned here. How can I get rid of this as I am actually expecting my loop to be ended by an exception and hence no break is required.