Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 390196

Summary: [quick fix] "Add unimlemented methods" generate methods with default visibility
Product: [Eclipse Project] JDT Reporter: Christian Schwarz <chriss.dev>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: deepakazad, Olivier_Thomann
Version: 4.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Christian Schwarz CLA 2012-09-24 08:50:22 EDT
The quickfix "Add unimlemented methods" generate methods methods with default visibility when the interface to be implemented contains methods without visibility modifier.

interface I{
  //no need for a 'public' modifier, it must be public anyway
  void doIt();
}

class C implements I {

   //Error: Cannot reduce the visibility of the inherited method from I
   doIt(){
      //the generated method
   }
}
Comment 1 Olivier Thomann CLA 2012-09-24 09:02:45 EDT
Move to JDT/UI
Comment 2 Deepak Azad CLA 2012-10-18 00:14:38 EDT
The quick fix works correctly for me with the given snippet. Please reopen if you have more information/different snippet.
Comment 3 Deepak Azad CLA 2012-10-18 01:23:33 EDT
Ok likely a duplicate of bug 387940.

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