Project: JDT
Bug 35004 remove final from Variable Declaration after surround with try/catch [refactoirng]
Reported: 2003-03-14 06:13:56 | Status: resolved fixed

consider the code fragment: { ... final File testFile = new File("testFile); ... } after surrounding with a try/catch Block I got something like: { ... final File testFile; try { testFile = new File("testFile); } catch (IOException e) { e.printStackTrace(); } ... } The Problem here is that the Compiler complains about the final declaration. I suggest to remove the final from the declaration.

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/SurroundWithWorkSpace/SurroundWithTests/trycatch_in/TestWrappedLocal8.java org.eclipse.jdt.ui.tests.refactoring/resources/SurroundWithWorkSpace/SurroundWithTests/trycatch_out/TestWrappedLocal8.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/SurroundWithTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/surround/SurroundWithTryCatchRefactoring.java