Bug 129807 [cleanup] Add final cleanup should only add keyword on methods with body
I20060223-1656 + ZRH plugin export The final keyword should only be added on methods with body. In particular, final should be omitted for interface methods and abstract methods.
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/CleanUpTest.java
buf.append("        List<E1> list2= new ArrayList<E1>();\n");
		buf.append("        for (E1 e1 : list1) {\n");
		buf.append("            for (Object element0 : list2) {\n");
		buf.append("                E1 e2 = (E1) element0;\n");
		buf.append("                System.out.println(e2);\n");
		buf.append("            }\n");
		buf.append("            System.out.println(e1);\n");
		buf.append("        }\n");
		buf.append("    }\n");
		buf.append("}\n");
		String expected1= buf.toString();
		
		assertRefactoringResultAsExpected(refactoring, new String[] {expected1});
	}
	
	public void testJava50ForLoop03() throws Exception {
		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
		StringBuffer buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("public class E1 {\n");
		buf.append("    public void foo() {\n");
		buf.append("        int[] array={1,2,3,4};\n");
		buf.append("        for (int i=0;i<array.length;i++) {\n");
		buf.append("            String[] strs={\"1\",\"2\"};\n");
		buf.append("            for (int j = 0; j < strs.length; j++) {\n");
		buf.append("                System.out.println(array[i]+strs[j]);\n");
		buf.append("            }\n");
		buf.append("        }\n");
		buf.append("    }\n");
		buf.append("}\n");