switch
break
break 语句导致重构复杂化,可能令人困惑。
示例:
void foo(List<String> strs) { for (String str : strs) { if (str.contains("stop")) break; handleStr(str); } }