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.

2157 questions
1104
votes
4 answers

How to mark a method as obsolete or deprecated?

How do I mark a method as obsolete or deprecated using C#?
Chris Ballance
  • 32,056
  • 25
  • 101
  • 147
706
votes
5 answers

Why is Java Vector (and Stack) class considered obsolete or deprecated?

Why is Java Vector considered a legacy class, obsolete or deprecated? Isn't its use valid when working with concurrency? And if I don't want to manually synchronize objects and just want to use a thread-safe collection without needing to make fresh…
fjsj
  • 10,501
  • 9
  • 36
  • 54
504
votes
32 answers

UIDevice uniqueIdentifier deprecated - What to do now?

It has just come to light that the UIDevice uniqueIdentifier property is deprecated in iOS 5 and unavailable in iOS 7 and above. No alternative method or property appears to be available or forthcoming. Many of our existing apps are tightly…
Oliver Pearmain
  • 17,376
  • 12
  • 77
  • 83
465
votes
4 answers

getResources().getColor() is deprecated

Using: buildToolsVersion "22.0.1" , targetSdkVersion 22 in my gradle file. I found that the useful getResources().getColor(R.color.color_name) is deprecated. What should I use instead?
David
  • 34,355
  • 30
  • 113
  • 139
387
votes
5 answers

Rails I18n validation deprecation warning

I just updated to rails 4.0.2 and I'm getting this warning: [deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to…
Mauricio Moraes
  • 6,889
  • 5
  • 34
  • 54
338
votes
14 answers

Html.fromHtml deprecated in Android N

I am using Html.fromHtml to view html in a TextView. Spanned result = Html.fromHtml(mNews.getTitle()); ... ... mNewsTitle.setText(result); But Html.fromHtml is now deprecated in Android N+ What/How do I find the new way of doing this?
Aldasa
  • 3,911
  • 2
  • 15
  • 28
326
votes
10 answers

What are the alternatives now that the Google web search API has been deprecated?

Google Web Search API has been deprecated and replaced with Custom Search API (see http://code.google.com/apis/websearch/). I wanted to search the whole web but it looks like with the new API only custom sites can be searched. Is there a way to…
Dan
  • 9,093
  • 13
  • 48
  • 69
325
votes
20 answers

Replacement for deprecated sizeWithFont: in iOS 7?

In iOS 7, sizeWithFont: is now deprecated. How do I now pass in the UIFont object into the replacement method sizeWithAttributes:?
James Kuang
  • 10,562
  • 4
  • 26
  • 37
301
votes
6 answers

How to declare or mark a Java method as deprecated?

I would like to make one of my methods "deprecated" = not used anymore. But still I would like to have it in my API. I just want to show "warning" to anyone using that method. How can I achieve that?
Pavel Janicek
  • 12,577
  • 12
  • 47
  • 76
278
votes
10 answers

jQuery 1.9 .live() is not a function

I recently updated jQuery from 1.8 to 2.1. I suddenly discovered that the .live() stops working. I get the error TypeError: $(...).live is not a function. Is there any method I can use in place of .live()?
ngplayground
  • 16,883
  • 32
  • 91
  • 160
239
votes
14 answers

Java: Why is the Date constructor deprecated, and what do I use instead?

I come from the C# world, so not too experienced with Java yet. I was just told by Eclipse that Date was deprecated: Person p = new Person(); p.setDateOfBirth(new Date(1985, 1, 1)); Why? And what (especially in cases like above) should be used…
Svish
  • 138,188
  • 158
  • 423
  • 589
223
votes
4 answers

How to mark a class as Deprecated?

Possible Duplicate: How do I mark a method as Obsolete/Deprecated? - C# How do you mark a class as deprecated? I do not want to use a class any more in my project, but do not want to delete it before a period of 2 weeks.
Mister Dev
  • 9,031
  • 12
  • 39
  • 33
220
votes
18 answers

Is the buildSessionFactory() Configuration method deprecated in Hibernate

When I updated the Hibernate version from 3.6.8 to 4.0.0, I got a warning about deprecated method buildSessionFactory() in this line: private static final SessionFactory sessionFactory = new…
pushistic
  • 3,368
  • 3
  • 19
  • 35
203
votes
12 answers

Why is the
tag deprecated in HTML?

I am just curious as to why the
tag in HTML was deprecated. The
was a simple way of quickly center-aligning blocks of text and images by encapsulating the container in a
tag, and I really cannot find any simpler way on how…
Andreas Grech
  • 98,643
  • 98
  • 284
  • 354
199
votes
16 answers

How to ignore deprecation warnings in Python

I keep getting this : DeprecationWarning: integer argument expected, got float How do I make this message go away? Is there a way to avoid warnings in Python?
Mohammed
  • 2,163
  • 2
  • 14
  • 8
1
2 3
99 100