Community
Participate
Working Groups
When I have this ternary operator … public String toString(boolean b) { return b ? "true" : "false"; } … the formatter converts it to … public String toString(boolean b) { return b ? "true" : "false"; } When I want to keep the line breaks, I can insert empty comments at the end of the line. public String toString(boolean b) { return b // ? "true" // : "false"; } The formatter converts this to: public String toString(boolean b) { return b // ? "true" // : "false"; } The question mark and the colon should be aligned in the same column.
Thanks for the report, but we are not going to have the time to look at this any time soon. If anyone is willing to provide a patch, we can take a look at.
This problem no longer occurs after the formatter redesign. *** This bug has been marked as a duplicate of bug 303519 ***