On Tue, Sep 1, 2009 at 11:41 AM, Noel Grandin<[email protected]> wrote:
>
> It's legal and technically correct Java, but I prefer to write such
> things like this:
>
>   while (iterator.hasNext()) {}
>
> to make it obvious that it's an empty block.
>

And even better:

while (iterator.hasNext()) { /* intentionally left blank */ }

But this type of code does smell pretty awful and should be avoided in
the first place.

Martijn

Reply via email to