mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-07 22:09:38 +07:00
31 lines
661 B
HTML
31 lines
661 B
HTML
<html>
|
|
<body>
|
|
Reports <code>switch</code> statements or expressions in which the <code>default</code> branch
|
|
is positioned before another case.
|
|
Such a construct is unnecessarily confusing.
|
|
A quick-fix is provided to move the <code>default</code> branch to the last position, if possible.
|
|
<p><b>Example:</b></p>
|
|
<pre><code>
|
|
switch (n) {
|
|
default:
|
|
System.out.println();
|
|
break;
|
|
case 1:
|
|
break;
|
|
}
|
|
</code></pre>
|
|
<p>After the quick-fix is applied:</p>
|
|
<pre><code>
|
|
switch (n) {
|
|
case 1:
|
|
break;
|
|
default:
|
|
System.out.println();
|
|
break;
|
|
}
|
|
</code></pre>
|
|
<!-- tooltip end -->
|
|
<p>
|
|
|
|
</body>
|
|
</html> |