Questions tagged [deprecated]

Deprecation is a status applied to software features or language terms to indicate that they should be avoided, typically because they have been superseded. Use this tag for questions about deprecated features or how to deprecate features yourself (e.g. using annotations).

In the process of authoring computer software, its standards or documentation, deprecation is a status applied to software features to indicate that they should be avoided, typically because they have been superseded. Although deprecated features remain in the software, their use may raise warning messages recommending alternative practices, and deprecation may indicate that the feature will be removed in the future.

Features are deprecated—rather than immediately removed—in order to provide backward compatibility and give programmers who have used the feature time to bring their code into compliance with the new standard.

2508 questions
54
votes
8 answers

Why is StringTokenizer deprecated?

The Java documentation doesn't seem to mention anything about deprecation for StringTokenizer, yet I keep hearing about how it was deprecated long ago. Was it deprecated because it had bugs/errors, or is String.split() simply better to use…
donnyton
  • 5,874
  • 9
  • 42
  • 60
54
votes
2 answers

@deprecated vs @Deprecated

I'm able to deprecate a function or class with the @Deprecated annotation. But there is a @deprecated javadoc tag in a javadoc comment itself marking the class/function as deprecated. Does the @deprecated javadoc tag actually make the…
N K
  • 3,217
  • 5
  • 23
  • 38
53
votes
0 answers

Removed operator!= in C++20 standard library

According to cppreference, the operator!= of many standard library types, including std::unordered_map::operator!= and std::unordered_set::operator!= is removed in C++20. What is the committee's rationale behind the decision? Won't this make the…
plasmacel
  • 8,183
  • 7
  • 53
  • 101
52
votes
3 answers

Is it possible to deprecate some of the values of a Java enum and if so, how?

I want to deprecate some, but not all possible enumeration values.
Steve Cohen
  • 4,679
  • 9
  • 51
  • 89
52
votes
4 answers

How can I get rid of deprecated warnings in deprecated functions in GCC?

One way to implement deprecation warnings is to produce warnings on calls to deprecated functions, unless you are calling from a deprecated context. This way legacy code can call legacy code without producing warnings that only amount to noise. This…
Magnus Hoff
  • 21,529
  • 9
  • 63
  • 82
50
votes
3 answers

Bouncycastle: X509CertificateHolder to X509Certificate?

In versions prior to r146 it was possible to create X509Certificate objects directly. Now that API is deprecated and the new one only deliveres a X509CertificateHolder object. I cannot find a way to transform a X509CertificateHolder to…
Steffen Heil
  • 4,286
  • 3
  • 32
  • 35
50
votes
1 answer

Is Joda Time deprecated with java 8 Date and Time API? (java.time)

Is there any reason to use Joda Time if I can use Java 8 Date and Time API (java.time)? Should I use Java 8 Date and Time every time?
Ondrej Bozek
  • 10,987
  • 7
  • 54
  • 70
50
votes
15 answers

Will the and tags ever become deprecated?

(This is more of a curiousity question than any pending disaster :D ) So the and tags have been around since near the beginning of the web (I assume). But now we have CSS and many people apposing "stylistic html tags." They are stylistic…
Gordon Gustafson
  • 40,133
  • 25
  • 115
  • 157
50
votes
1 answer

How to use spl_autoload() instead of __autoload()

According to http://php.net/manual/en/language.oop5.autoload.php the magic function __autoload() was deprecated as of PHP 7.2.0 and removed as of PHP 8.0.0. The official alternative is spl_autoload(). See…
Sliq
  • 15,937
  • 27
  • 110
  • 143
49
votes
4 answers

Non Deprecated findPreference() Method? - Android

I want to detect when a Preference contained in a ListView gets clicked, so that I can launch an intent to manage that selection. I would have done like this in my layout XML file:
Matteo
  • 7,924
  • 24
  • 84
  • 129
48
votes
10 answers

Java's Date(...) constructor is deprecated; what does that mean?

I'm trying to create a Date like this: date = new Date(year-1900, mon-1, day, hrs, min, sec); and Eclipse gives me this warning: "The constructor Date(int, int, int, int, int) is deprecated". What does it mean for a constructor to be deprecated,…
snakile
  • 52,936
  • 62
  • 169
  • 241
46
votes
2 answers

GET_TASKS Permission Deprecated

I have an security App (App Locker) that uses this permission: android.permission.GET_TASKS In android Lollipop this permission is deprecated and i want that my app works in +21 API. Can anyone guide me how? Thnx :)
Saman Sattari
  • 3,322
  • 6
  • 30
  • 46
45
votes
5 answers

OnCameraChangeListener() is deprecated

Today, looking back at my old code, I've found out that OnCameraChangeListener() is now deprecated. I'm finding difficult to understand how to fix this piece of code of mine: mGoogleMap.setOnCameraChangeListener(new…
Davide3i
  • 1,035
  • 3
  • 15
  • 35
45
votes
7 answers

How to fix the session_register() deprecated issue?

How to fix the session_register() deprecated problem in PHP 5.3
DEVOPS
  • 18,190
  • 34
  • 95
  • 118
45
votes
5 answers

Why were most java.util.Date methods deprecated?

When you look at the javadoc of the java.util.Date class, most of the methods are deprecated. Why was this done?
Daniel Kaplan
  • 62,768
  • 50
  • 234
  • 356