Bug 113665 [quick fix] 'add unimplemented methods' does not recognise RuntimeExceptions correctly
If the imlpementation of a method defined inan interface additionally (to the interface declaration) throws some RuntimeException - which is legal - quick fix will add a new method when run the next time. However, there is no error indocatur until something changes in the interface (eg a new method is added). After quick fix was run, there are errors about duplicate methods. How to reproduce: - open the attached interface and implementing class - uncomment the second method in IInterface.java - now run quick fix 'add unimplemented methods' on ImplementingClass.java
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/LocalCorrectionsQuickFixTest.java
buf.append("    public E(int i) {\n");
		buf.append("        this.count= 1;\n");
		buf.append("    }\n");
		buf.append("}\n");
		assertEqualString(preview, buf.toString());
	}
	
	public void testUnqualifiedFieldAccess_bug88313() throws Exception {
		Hashtable hashtable= JavaCore.getOptions();
		hashtable.put(JavaCore.COMPILER_PB_UNQUALIFIED_FIELD_ACCESS, JavaCore.ERROR);
		hashtable.put(JavaCore.COMPILER_PB_FIELD_HIDING, JavaCore.ERROR);
		JavaCore.setOptions(hashtable);
				
		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
		StringBuffer buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("public class F {\n");
		buf.append("    protected Object someObject;\n");
		buf.append("}\n");
		pack1.createCompilationUnit("F.java", buf.toString(), false, null);
		
		buf= new StringBuffer();
		buf.append("package test1;\n");
		buf.append("public class E extends F {\n");
		buf.append("    public void foo() {\n");
		buf.append("        new Object() {\n");
		buf.append("            public String toString() {\n");
		buf.append("                return someObject.getClass().getName();\n");
		buf.append("            }\n");
		buf.append("         };\n");