Community
Participate
Working Groups
When I make use of a deprecated method it used to be shown in task-view. Since 2.1, 2.1.1, 3.0 it isn't any more. E.g. Component c = new JFrame(); c.show(); should (according to javac) print out: warning: show() in java.awt.Component has been deprecated and JFrame c = new JFrame(); c.show(); not. In my environment (Usage of deprecated API: warning or error) this is not the case.
Seems to work for me: Do you get the warning marker in the editor's (left) marker bar? Did you enable project specific compiler settings? Maybe deprecation is disabled there. Is this is only the case for Component c = new JFrame(); c.show(); or do you also get no warning for public class B { /** * @deprecated */ public static void foo1() { } } public class a { public void foo2() { B.foo1(); } }
public class A { /** * @deprecated */ public static void foo1() { } } public class B { public static void main(String[] args) { A.foo1(); Component c = new JFrame(); c.show(); } } --- In my configuration A.foo1(); is signaled as deprecated, indicating by a yellow warning symbol in the left column of the editor and in the task view. c.show() is NOT marked as usage of deprecated methods. Occurs to me Compiler 1.3/1.4, "Usage of deprecated API" - Warning
By the way: this concerns Eclipse 2.1, 2.1.1 and 3.0M1. A test in recent 3.0M2 shows the usage of deprecated API left to c.show()! So there must've been some changes since, then.
moving to jdt.core
Oliver - pls investigate what has changed on this front.
Ok. Here some more infos: Using JRE 1.3 as underlying Runtime, the deprecation warnings are displayed. That's true for 1.4.0. 1.4.1 - untested - 1.4.2 shows the described behaviour, only self-made deprecations are shown, platform deprecations are suppressed OS: Windows XP, SP 1
Ok, this should explain the problem, but not solve it... When I first ran my Eclipse it catched 1.4.2 JRE (not J2SDK!) as underlying runtime. There must've been several changes to rt.jar, especially debug and deprecation information, cause the rt.jar of JRE and SDK have according to my collegue different sizes. When I use the SDK as runtime I see all deprecation warnings. It worked in my eclipse 3.0M2 'cause I used the J2SDK there. So I suggest to close this bug and instead make I installation remark to use SDK.
Closed as INVALID. Jim, please add note in readme.
and only show unused metods (16.07.2004)
Olivier, I'm not sure what the release note should cover. Please draft an item and I will add to release notes.
The release notes should cover the fact that the compilation should be made against the libraries of a SDK not the libraries of a JRE. The JRE libraries don't contain deprecated information since they are not packaged to be used for compilation, only for runtime. So the compiler cannot issue deprecated warnings when the code is compiled against JRE libraries.
Included JDT release note for 3.0.1.