void () { doTest("class X {" + " void x(E e) {" + " switch (e) {" + " /*'default' branch is unnecessary*/default/*_*//**/:" + " int x = 1;" + " System.out.println(x);" + " case A,B:" + " x = 2;" + " System.out.println(x);" + " }" + " }" + "}"); checkQuickFix("Remove 'default' branch", """ class X { void x(E e) { switch (e) { case A, B: int x; x = 2; System.out.println(x); } }}"""); }