Project: JDT
Bug 45081 Method inlining yields compile errors on method bodies with try/catch [refactoring]
Reported: 2003-10-17 06:06:12 | Status: resolved fixed

3.0 M4: When using the "Inline" refactoring on a method with body like the following: int alignOffset(int offset) { try { return document.getLineInformationOfOffset(offset).getOffset(); } catch (BadLocationException exception) { return offset; }; } the body is directly assigned to the target variable at the call site when calling "offset= alignOffset(offset)": offset= try { return document.getLineInformationOfOffset(offset).getOffset(); } catch (BadLocationException exception) { return offset; };

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/invalid/TestInterruptedExecutionFlow.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/InlineMethodTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/CallInliner.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/SourceProvider.java