Project: JDT
Bug 388078 [inline] inline logical or in and expression goes wrong
Reported: 2012-08-27 03:08:43 | Status: resolved fixed

If I inline a boolean or expression into an and expression, the operator precedence is ignored. boolean doitOr(boolean a, boolean b, boolean c) { boolean or = a || b; return or && c; } Inline local variable 'or' yields the wrong result: boolean doitOr(boolean a, boolean b, boolean c) { return a || b && c; } while plus workd int doitPlus(int a, int b, int c) { int plus = a + b; return plus * c; } resolves correct to: int doitPlus(int a, int b, int c) { return (a + b) * c; }

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/InlineTemp/canInline/A_test48_in.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineTemp/canInline/A_test48_out.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/InlineTempTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/InlineTempRefactoring.java