1 /** 2 * @test /nodynamiccopyright/ 3 * @bug 8206986 4 * @compile/fail/ref=SwitchNullDisabled.out -XDrawDiagnostics SwitchNullDisabled.java 5 */ 6 7 public class SwitchNullDisabled { 8 private int switchNull(String str) { 9 switch (str) { 10 case null: return 0; 11 case "": return 1; 12 default: return 2; 13 } 14 } 15 }