Bug 72162 - Deprecated methods do not appear as warnings
Summary: Deprecated methods do not appear as warnings
Status: RESOLVED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-18 09:23 EDT by Cliff Evans CLA
Modified: 2004-10-27 06:58 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cliff Evans CLA 2004-08-18 09:23:30 EDT
The use of deprecated methods from the JDK is not being indicated as a warning
even though my compiler settings have "Usage of deprecated API".  Deprecated
methods for external jars appear to work as expected.  Changing the severity
level from warning to error has no effect.

e.g.

new Date ().setYear ( 2005 - 1900 );
new Thread ().stop ();
Comment 1 Olivier Thomann CLA 2004-08-18 11:06:08 EDT
Are you using a JDK or a JRE in your libraries?
Comment 2 Cliff Evans CLA 2004-08-18 13:05:33 EDT
Ah!  Spot on.  I've changed the installed JRE setting to point to the JDK and
reset the libraries to use those supplied with the JDK and it works.

Why does Eclipse not default to using the JDK on install?

What other features are effected by running against a JRE rather than a JDK?
Comment 3 Olivier Thomann CLA 2004-08-18 13:30:58 EDT
I don't know. The point is that the JRE doesn't contain the deprecation
information. So it is impossible for the compiler to guess that a type, a method
or a field is deprecated if the libraries used to compile come from a JRE.
Eclipse needs a JRE to run. But it is up to the user to use a JRE or a JDK to
compile. A JDK is also useful if you want to use javac in an ant script.
Closing as INVALID.