java: add more explanation in inspection description

GitOrigin-RevId: 22360ea2fc3c167089003b6a9794b4fd09be3768
This commit is contained in:
Bas Leijdekkers
2024-02-07 11:30:40 +01:00
committed by intellij-monorepo-bot
parent 3927883f0f
commit def643195d

View File

@@ -2,8 +2,9 @@
<body>
<p>
Reports <code>while</code> loops that could be more effectively written as <code>do-while</code> loops.
The focus is on cases where the entire body of the <code>while</code> loop is executed before the condition is checked,
leading to potential redundancy in code execution.
There are <code>while</code> loops where the code just before the loop is identical to the code in the body of the loop.
Replacing with a <code>do-while</code> loop removes the duplicated code.
For <code>while</code> loops without such duplicated code, the quick fix is offered in the editor as well, but without highlighting.
</p>
<p><b>Example:</b></p>
<pre><code>