Files
openide/java/java-impl/resources/inspectionDescriptions/SwitchStatementDensity.html
Leonid Shalupov 40795fe787 IJI-2422: community/java: move resources under resources root
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
2025-02-05 04:43:28 +00:00

24 lines
740 B
HTML

<html>
<body>
Reports <code>switch</code> statements or expressions
with a too low ratio of switch labels to executable statements.
<p>Such <code>switch</code> statements
may be confusing and should probably be refactored.</p>
<p>Example:</p>
<pre><code>
switch (i) { // one case and 5 executable statements -> 20% density
case 1:
System.out.println("1");
System.out.println("2");
System.out.println("3");
System.out.println("4");
System.out.println("5");
break;
}
</code></pre>
<!-- tooltip end -->
<p>
<p>Use the <b>Minimum density of branches</b> field to specify the allowed ratio of the switch labels to executable statements.</p>
</body>
</html>