mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IG: add test case for rule based switch
This commit is contained in:
+29
@@ -74,4 +74,33 @@ public class SwitchStatementDensity
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
public void ruleBaseSwitch(String s) {
|
||||
<warning descr="'switch' has too low of a branch density (9%)">switch</warning> (s) {
|
||||
case "one" -> {
|
||||
System.out.println(1);
|
||||
System.out.println(1);
|
||||
System.out.println(1);
|
||||
System.out.println(1);
|
||||
System.out.println(1);
|
||||
System.out.println(1);
|
||||
System.out.println(1);
|
||||
System.out.println(1);
|
||||
System.out.println(1);
|
||||
System.out.println(1);
|
||||
System.out.println(1);
|
||||
System.out.println(1);
|
||||
System.out.println(1);
|
||||
System.out.println(1);
|
||||
System.out.println(1);
|
||||
System.out.println(1);
|
||||
System.out.println(1);
|
||||
System.out.println(1);
|
||||
System.out.println(1);
|
||||
}
|
||||
case "two" -> {
|
||||
System.out.println(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user