Community
Participate
Working Groups
The Java formatter fails to format anything if a file contains method with varargs of a parameterized type. In the snippet below, the formatter only works if case1 is commented-out or removed. case2 and case3 do not cause problems. import java.util.List; public class Bug { void case1(List<Object>... lists) { int notFormatted; } void case2(List... lists) { int notFormatted; } void case3(List<Object> lists) { int notFormatted; } }
Fixed and released in HEAD. Regression test added in FormatterRegressionTests.test545.
I also added a test case for qualified parameterized type reference as varargs.
Verified in 20050330-0500