Skip to main content

Java 7 small proposal (do not allow empty 'if')

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2006-08-28

I have a small suggestion for java 7. Please do not let compiler to compile this code with empty 'if' (note semicolumn on 'if' line):
if (cond()) ;
This code most likely a bug and compiler should have been raising an error, but this code still compiles fine in java 7.