Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 377243 - [quick fix] Invalid suggestion while trying to override package-visible method
Summary: [quick fix] Invalid suggestion while trying to override package-visible method
Status: CLOSED DUPLICATE of bug 87239
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.8   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-20 01:26 EDT by Ayushman Jain CLA
Modified: 2012-04-23 01:20 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ayushman Jain CLA 2012-04-20 01:26:28 EDT
I20120314-0800

Test case from bug 357547 comment 0.

package p2;
public class C {
}
package p1;
import p2.*;
public class B extends A {
  long k(){
    return 0;
  }
}
package p2;
public class A {
  long k(){
    return 1;
  }
  public long m(){
    return new A().k();
  }
}

I get a warning on B.k() - The method B.k() does
not override the inherited method from A since it is private to a different
package. Quick fix offered is 'change visibility of A.k to default'. This quick fix is bogus and does not fix the warning.
Comment 1 Deepak Azad CLA 2012-04-23 01:20:52 EDT
Looks similar to bug 87239.

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