Re:Those Who Say Code Does Not Matter
by peterashford on Wednesday April 16, 2014 @11:53PM
(#7601935)
Java (if it had gotos) would not have compiled this code because it doesn't allow unreachable code.
[ Parent
| on HN ]
In the Apple SSL bug, a goto statement works much like a function call or a throw in Java. Here's a Java example that compiles without warning and has the same flaw:
public static void foo() throws Exception {
throw new Exception();
}
public static int bar() throws Exception {
int x = 0;
if(x == 1)
foo();
foo();
x++;
return x;
}