There seems to be a bug in java indentation. The maintainer (Cc'ed) is said to be resigned, so I'm writing here. It is sort of special situation. Take a look at the println() in the following:
public class Bug { public static void main(String args[]) { Foo.bar(new Baz() { public void run() { if (true) { /*nothing here*/ } while (true); System.out.println("doh!"); } }); } } And some findings - it indent's correctly if you: a) put the if .. { .. } on one line b) remove the if c) remove the while() d) add body to the while -- Best regards, Tomas Golembiovsky -- |========================|----- - - | | Law of Algebra | | You never catch on until after the test. | |----- - -