Project: JDT
Bug 279715 [inline] Inline Constant and Inline Local Variable are missing parentheses for extended '-' chains
Reported: 2009-06-09 18:36:18 | Status: verified fixed

I20090605-1444 Inline Constant and Inline Local Variable are missing parentheses for extended '-' chains: public class Try { public static final int B= 12; public static final int C= B - 1; //inline C public static final int K= 99; public static void main(String[] args) { // int B= 12; // int C= B - 1; //inline C // int K= 99; int f1= K - 1 - C; int f2= K - C - C - C; int x1= K + C; int x2= K - C; int x3= K + 1 - C; int x4= K - 1 + C; int x5= K + 1 + C - C - C; } }

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/InlineConstant/canInline/test33/in/A.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineConstant/canInline/test33/out/A.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/InlineConstantTests.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTNodes.java