Community
Participate
Working Groups
...warn possibly incorrect conditional: if (foo); while (foo); { ... } for (int x=0;i<len;i++); { ... } etc. the first should warn if there are (likely) no side-effects. the last two (with proceeding '{') should always warn. this can be even more general as any time you have a '{' after a ';' (in a method) it is likely an error (though not always).
This is an enhancement, not a bug.
whoops, my mistake. thought i set it.
these are good suggestions, unclear we will throw some more in for 3.0, may rather keep for later.
defer
post 3.0 :)
This is fixed in 3.0 with the Empty statement error/warning. If you have this code: public class X { public static final void main(String args[]) { boolean foo = false; if (foo); while (foo); { } for (int i=0, len = 10;i<len;i++); { } } } All ';' are reported as "Empty control-flow statement". Closing as FIXED.
Verified in 3.0.2.