Community
Participate
Working Groups
Using latest, this option has no effect. Set to true/false gives the same result. The code formatter preferences page clearly shows the problem.
Fixed and released in HEAD. Regression tests updated.
The FORMATTER_KEEP_EMPTY_ARRAY_INITIALIZER_ON_ONE_LINE already had an effect before this change. When FORMATTER_BRACE_POSITION_FOR_ARRAY_INITIALIZER (prefs page > Braces > Array Initializer) was set to NEXT_LINE or NEXT_LINE_SHIFTED, the user could disable wrapping before the opening brace by checking "Keep empty array initalizer on one line". Now, the FORMATTER_KEEP_EMPTY_ARRAY_INITIALIZER_ON_ONE_LINE option does what it did before, *plus* it always forces a line break inside an empty array initializer (but not inside non-empty array initializers). IMO, this new behavior does not make sense since it mixes two options.
Do you want me to revert the change? I found the problem by looking at the code formatter preferences page were the option has apparently no effect.
Closing as INVALID. I revert the change. I could then reproduce bug 81497 that is now fixed.