Files
openide/plugins/groovy/groovy-psi/resources/inspectionDescriptions/GroovyFallthrough.html
alexey.afanasiev 892a0ba1fb [groovy] Proofreading inspections.
GitOrigin-RevId: 3f2da6a12ebc912aa0838ab3f7c01f939d29e94d
2021-06-07 21:47:27 +00:00

19 lines
429 B
HTML

<html>
<body>
Reports <i>fallthrough</i> in switch statements. While occasionally useful, fallthrough is often unintended, and may lead to surprising bugs.
<p><b>Example:</b></p>
<pre>
<code>
switch(n) {
case 1:
print 1
case 2: // "case 1" fallthrough to "case 2". Statements from "case 2" will be executed immediately after "case 1".
print 2
break
default:
print "Default"
}
</code>
</pre>
</body>
</html>