Community
Participate
Working Groups
Build ID: I20070625-1500 Steps To Reproduce: Enter the following line in any source code file: int i = (2+3+2)+2; and the formatter will stop working for that file. A more complete example of a file on which the formatter will not work: public class Main { public static void main(String[] args) { int i = (2+3+2)+2; } } More information:
Can reproduce on I20070724-0800.
This is due to a problem when the CombinedBinaryExpression is built. I don't know why, but the parenthesis are not set on the right expression leading to the failure while formatting the code.
Created attachment 75062 [details] Proposed fix
Released for 3.4M1. Added regression test in org.eclipse.jdt.core.tests.formatter.FormatterRegressionTests#test668. Philippe, candidate for 3.3.1?
Verified for 3.4M1 using build I20070806-1800.
Jérôme, +1 for 3.3.1 ?
+1 for backporting to 3.3.1
Reopen for 3.3.1.
Released for 3.3.1. Added regression test in org.eclipse.jdt.core.tests.formatter.FormatterRegressionTests#test668.
Verified for 3.3.1 using build M20070831-2000.