Community
Participate
Working Groups
I've found the new (3.0-M6) code formatter choking on (what i believe to be) a legal Java code snippet. by choke, i mean the TextEdit returned from the format() call is null. ===8<=======8<=========8<===========8< class Foo { public static final Foo KABOOM = new Foo(); private Foo() { } public Foo blowup() { return(Foo.KABOOM); } } ===8<=======8<=========8<===========8< the null TextEdit can be avoided if: a) the parentheses in the return statement are removed or b) the return statement is changed to: return(KABOOM); however, both jikes and javac compile the snippet above, so it seems like the formatter should handle it as well.
Can be reproduced via UI (nothing in .log)
I will investigate.
Fixed and released in HEAD. Regression test added.
Verified for 3.0-M7 with build I200402102000.