Bug 28869 Parse error with final local vars without immediate assignment
Consider this prototype code: void foo() { final PreparedStatement statement; try { statement = xxx.prepareStatement(...) } catch (..) { // handle errors } return statement; } For this kind of thing I often use a final local variable - mostly to enable the compiler to find my errors (like assigning more than once). However, with Eclipse I get parse errors (cursor on the line that declares the local var) when using refactoring functions, such as "Reorganize imports". The Eclipse version used is Eclipse 2.1 M4.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/ui/actions/OrganizeImportsAction.java
IChooseImportQuery query= new IChooseImportQuery() {
				public TypeInfo[] chooseImports(TypeInfo[][] openChoices, ISourceRange[] ranges) {
					throw new OrganizeImportError();
				}
			};
	
			for (int i= 0; i < cus.length; i++) {
				ICompilationUnit cu= cus[i];
				String cuLocation= cu.getPath().makeRelative().toString();
				
				try {
					cu= JavaModelUtil.toWorkingCopy(cu);
					
					monitor.subTask(cuLocation);
					OrganizeImportsOperation op= new OrganizeImportsOperation(cu, prefOrder, threshold, ignoreLowerCaseNames, !cu.isWorkingCopy(), doResolve, query);
					op.run(new SubProgressMonitor(monitor, 1));
					if (monitor.isCanceled()) {
						throw new OperationCanceledException();
					}
					
					ISourceRange errorRange= op.getErrorSourceRange();
					if (errorRange != null) {
						String message= ActionMessages.getFormattedString("OrganizeImportsAction.multi.error.parse", cuLocation); 
						status.add(new Status(Status.INFO, JavaUI.ID_PLUGIN, Status.ERROR, message, null));
					} 
				} catch (OrganizeImportError e) {
					String message= ActionMessages.getFormattedString("OrganizeImportsAction.multi.error.unresolvable", cuLocation); 
					status.add(new Status(Status.INFO, JavaUI.ID_PLUGIN, Status.ERROR, message, null));
				} catch (ValidateEditException e) {