Duplicate :
|
Yeah, I know.. pretty picky... But the JLS appears to require statement not reachable errors on the following: class empty { int i; int f1() { return 1; /* unreachable empty statement -> */ ; } int f2() { while ( false ) /* unreachable empty statement -> */ ; return 2; } } If following the JLS spec is important, this should be fixed... Unfortunately there are 3 JCK positive lang testcases that have these kind of errors in them. See bug 4090844. It appears that declaration statements (without initializers) are already given the full statement treatment in that if you replace the above empty statements with "int k;", you WILL get errors. This was originally found to be a JLS issue by the Modena testbase. -kto kelly.ohair@Eng 1997-11-05