Bug 26664 - deprecated interfaces are not allways recognized
Summary: deprecated interfaces are not allways recognized
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 minor (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-19 09:33 EST by Michael Illgner CLA
Modified: 2002-12-18 05:51 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.