Hi,
Deprecated API means that you are using functions that almost will disappear
and new ones will come up (in new releases). To avoid those warnings, you
should go to the API help and find out the new functions that replace the
ones you are using. It is very important that you avoid using deprecated
functions, because in next releases of API you will get errors instead of
warnings.
Hope this helps,
Marco
-----Original Message-----
From: peterfrb2@y... [mailto:peterfrb2@y...]
Sent: Tuesday, December 04, 2001 2:55 PM
To: Servlets
Subject: [servlets] Re: Trouble getting packages to work
I have figured out my previous problem: there was an HTML.class in the
classes directory, so there were two versions of the same class file
competing for attention. When I erased the one in the classes directory,
then the com/wrox/util version was accessed.
But after compiling, I came across another message that I can't explain:
-----------------------------
Note: ShoppingCart.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
-----------------------------
This is really a warning since ShoppingCart.class does compile, but I
don't understand why the warning exist nor know what it means. When I do
as they ask, I get more warnings (but no errors) that I also don't
understand.
-----------------------------
ShoppingCart.java:21: warning: getValue(java.lang.String) in
javax.servlet.http.
HttpSession has been deprecated
Integer itemCount = (Integer) session.getValue("itemCount");
^
-----------------------------
The bottom line is that I am able to compile this file and get it to work,
but not without a warning. Can anyone describe deprecation to me and how
I might get the warnings to go away?
--Peter Ferber
---
SIGS Conference for Java Development
Targeted, focused classes, expertise level classes
taught by Java gurus, rigorous tutorials, and
exhibit floor makes SIGS Conference for Java
Development a learning experience unlike any
other. Join over 10,000 developers and programmers
from across the U.S. and around the world who
have benefited from attending SIGS/101 Conferences.
http://www.javadevcon.com