John D John D - 3 years ago 153
Java Question

What are the technical reasons for why one shouldn't use deprecated methods or classes?

What are the technical reasons for why one shouldn't use methods marked

@Deprecated
?

Why should I use something else when they work fine?

If there's no better alternative, and I use them what are some common performance issues with
@Deprecated
methods and/or classes?

Answer Source

There are three good reasons to deprecate an API, according to Java documentation:

  • It is insecure, buggy, or highly inefficient
  • It is going away in a future release
  • It encourages bad coding practices

I would expect a comment in the Javadoc to explain which of the three is applicable for the deprecated concerned, and without knowing which API you're referring to, I cannot get more specific than that.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download