Community
Participate
Working Groups
Autoformatting produces the following. The second synchronized statement is indented too deep. public static void main(String[] args) { Object o = null; synchronized (o) { // do something; } synchronized (o) { // do something else; } } The following was expected / preferred . public static void main(String[] args) { Object o = null; synchronized (o) { // do something; } synchronized (o) { // do something else; } }
using eclipse build 20020321
Further observations reveal that the code after the synchronized block is indented incorrently. public static void main(String[] args) { Object o = null; synchronized (o) { // do something; } System.out.println("next line"); System.out.println("next line after"); } when expecting public static void main(String[] args) { Object o = null; synchronized (o) { // do something; } System.out.println("next line"); System.out.println("next line after"); }
That looks like an old bug. I will try with latest integration build.
With latest (0412) I got the expected results. Closed.