This rule is defined by the following XPath expression:
//SwitchStatement [count(.//BreakStatement)=0] [count(SwitchLabel) > 0] [count(BlockStatement/Statement/ReturnStatement) + count(BlockStatement/Statement/ThrowStatement) < count (SwitchLabel)]
Example:
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(); } } }