Details
Description
javac compiles the following to unverifiable code:
class T {
public static void main(String[] args) {
switch (args.length) {
case 1:
if (true)
break;
int i = 1;
case 0:
i = 2;
System.out.print(i + " ");
}
System.out.print(args.getClass().getName());
}
}
class T {
public static void main(String[] args) {
switch (args.length) {
case 1:
if (true)
break;
int i = 1;
case 0:
i = 2;
System.out.print(i + " ");
}
System.out.print(args.getClass().getName());
}
}
Attachments
Issue Links
- duplicates
-
JDK-4750969 VerifyError with switch statement
- Closed