Bug 26664

Summary: deprecated interfaces are not allways recognized
Product: [Eclipse Project] JDT Reporter: Michael Illgner <fillg1>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: minor    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 M4   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Michael Illgner CLA 2002-11-19 09:33:59 EST
Short example :
We are publishing an (very simple ;-)API like interface

public interface Old {
    public static final int Constant = 42;
}

Due to cosmetical reasons and code conventions, this interface
is renamed to INew

public interface INew {
    public static final int Constant = 42;
}

Since we do not want to break old clients completly, we define the old
interface in terms of the new and deprecate it :

/**
 * @deprecated 
 */
public interface Old extends INew {
}

Now our "client" :

public class Test {
    
    public static void main(String[] args) throws Exception {
        System.out.println(INew.Constant);
        System.out.println(Old.Constant);
    }
}

The eclipse compiler does not recgonize the deprecated use of the interface Old,
but the standard javac does ...
Comment 1 Philipe Mulet CLA 2002-11-20 09:57:56 EST
Good find, and excellent small test case.
Comment 2 Philipe Mulet CLA 2002-11-20 09:58:17 EST
Fixed.
Comment 3 David Audel CLA 2002-12-18 05:51:49 EST
Verified.