Loading ...
Sorry, an error occurred while loading the content.

bug in java indentation

Expand Messages
  • Tomas Golembiovsky
    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
    Message 1 of 1 , May 2, 2007
    • 0 Attachment
      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.
      |
      |----- - -
    Your message has been successfully submitted and would be delivered to recipients shortly.