For, for-each, and while loop constructs only conditionally run their contents, so JStatement.unconditionalControlBreak() correctly returns false. However, do-while loops always are guaranteed to run their block at least once. This means that the following do-while loop should return true for unconditionalControlBreak
do {
return;
while (true);
}
This probably won't have any impact on compiled code, but is technically wrong today.
JTryStatement is also wrong in the same way, though all blocks need to have unconditional control break to return true. GIven try-with-resources, it is possible for that to be only one though, such as
try (var value = doSomething()) {
return value.getAllData();
}
For, for-each, and while loop constructs only conditionally run their contents, so JStatement.unconditionalControlBreak() correctly returns false. However, do-while loops always are guaranteed to run their block at least once. This means that the following do-while loop should return true for unconditionalControlBreak
This probably won't have any impact on compiled code, but is technically wrong today.
JTryStatement is also wrong in the same way, though all blocks need to have unconditional control break to return true. GIven try-with-resources, it is possible for that to be only one though, such as