Bug 32545

Summary: Cannot override a method that's accessible in the superclass, but inaccessible in the super-superclass
Product: [Eclipse Project] JDT Reporter: Davor Cubranic <davor.cubranic>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: blocker    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Davor Cubranic CLA 2003-02-22 03:07:16 EST
2.1M5

I'll describe the concrete problem:

Sun's Wireless Toolkit 1.0.4 defines class javax.microedition.lcdui.Displayable
which has method paint defined as abstract package private. In the same package,
there is also class Canvas, where paint is overriden as protected abstract.

Under 2.0, I could subclass Canvas and define the required paint method. Under
2.1, this is marked as syntax error because I'm trying to override a method that
was marked as package private in Displayable (but which my class, not being
abstract, has to define).

I'm not a Java language expert, but in my reading of the language specification
(2nd ed., section 8.4.6), I only see the immediate superclass as being important
in determining access scope and no mention of superclass's superclass. This
would make the new behaviour incorrect, not to mention that it breaks a major
Java toolkit.
Comment 1 Philipe Mulet CLA 2003-02-22 04:52:16 EST
In M5, we had a regression causing invalid diagnosis of missing abstract method 
implementations. This got resolved in subsequent builds, in particular our 
latest integration build should behave properly.

Closing as duplicate, please reopen if your steps still demonstrate an issue, 
and then please provide steps to reproduce.

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