Synopsis: | A switch statement does not contain a break |
Language: | Java |
Severity Level: | 1 |
Category: | Design |
Description: |
A switch statement without an enclosed break statement may be a bug.public class Foo { public void bar(int status) { switch(status) { case CANCELLED: doCancelled(); // break; hm, should this be commented out? case NEW: doNew(); case REMOVED: doRemoved(); } } } |