package insel;
public class Insel {
public static void main(String[] args) {
switch (1) {
case (1):
}
switch ("") {
case (""):
}
}
}
Eclipse und NetBeans kommen damit zurecht, nicht aber javac. Der Fehler ist bekannt und für das nächste Update gefixt.
An exception has occurred in the compiler (1.7.0). Please file a bug at the Java Developer Connection (http://java.sun.com/webapps/bugreport) after checking the Bug Parade for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.NullPointerException
at com.sun.tools.javac.comp.Lower.visitStringSwitch(Lower.java:3456)
at com.sun.tools.javac.comp.Lower.visitSwitch(Lower.java:3357)
at com.sun.tools.javac.tree.JCTree$JCSwitch.accept(JCTree.java:959)
at com.sun.tools.javac.tree.TreeTranslator.translate(TreeTranslator.java:58)
at com.sun.tools.javac.comp.Lower.translate(Lower.java:2160)
…