Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 406277 - [1.8][quick fix] 'Add unimplemented methods' results in overriding implemented methods also.
Summary: [1.8][quick fix] 'Add unimplemented methods' results in overriding implemente...
Status: CLOSED DUPLICATE of bug 409520
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-23 02:14 EDT by Martin Mathew CLA
Modified: 2013-06-12 06:44 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mathew CLA 2013-04-23 02:14:26 EDT
Copy paste the below code snippet to package explorer view.
package p1;

public interface I1 {	
	 public default int defaultMethod(){
		 return 10;
	 }	
	 
	 public static int staticMethod(){
		 return 20;
	 }
	 
	 public int abstractMethod();
}

package p1;

public class Clazz1 implements I1{}

Clazz1 has compiler error, invoke quick fix(Ctrl+1) on Clazz1 and select the option 'Add unimplemented methods'. This results in all the 3 methods in I1 to be overridden in Clazz1.
1. The refactoring results in compiler error as the static method is also overridden.
2. Should the default method be overriden through the quick fix? To resolve the compiler error, the user had to override the abstract method alone.
Comment 1 Martin Mathew CLA 2013-06-12 06:44:53 EDT

*** This bug has been marked as a duplicate of bug 409520 ***