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
92
votes
9 answers

Minimum Font Size deprecated on ios version 6.0

I just upgraded to xcode 4.5 with iOS 6.0 and it's highlighting a warning on all the UILabels in my XIB files saying "minimum font size deprecated on ios version 6.0". Does anyone know what this is referring to and how to fix it? Update: image is no…
Hooman Ahmadi
  • 1,397
  • 1
  • 12
  • 21
91
votes
17 answers

activeNetworkInfo.type is deprecated in API level 28

I want to use the Connectivity manager which provide the method activeNetworkInfo.type for checking the type of network in Android. This method was deprecated in API level 28. so what is the solution to check network type in API 28. my code is…
Pitty
  • 1,907
  • 5
  • 16
  • 34
90
votes
7 answers

Android LocationServices.FusedLocationApi deprecated

I couldn't figure out why LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient,mLocationRequest, this); "FusedLocationApi" is cross out and point at it saying is deprecated. Click here to view Image import…
vvvv
  • 1,003
  • 1
  • 8
  • 6
90
votes
4 answers

After updating Android Studio to version 1.3.0 I am getting "NDK integration is deprecated in the current plugin" Error

I have updated my Android Studio to version 1.3.0 before 3 days. Before that I can use NDK and now I am getting error like , Error:(50, 0) Error: NDK integration is deprecated in the current plugin. Consider trying the new experimental plugin. …
AndiGeeky
  • 11,266
  • 6
  • 50
  • 66
90
votes
2 answers

Is there still a use for inline?

I believed, inline was obsolete because I read here: No matter how you designate a function as inline, it is a request that the compiler is allowed to ignore: the compiler might inline-expand some, all, or none of the places where you call a…
Jonathan Mee
  • 37,899
  • 23
  • 129
  • 288
89
votes
1 answer

Android Deprecated Annotation is deprecated, what's the replacement?

According to Official Android Documentation Deprecated itself is deprecated in API level S. So what's the replacement for Deprecated which itself is deprecated? Edit: Added web archive link for historical reference.
YaMiN
  • 3,194
  • 2
  • 12
  • 36
89
votes
3 answers

How should I mark a method as "obsolete" in JS?

I am refactoring a rather large JS file that contains many unrelated methods into something that will regroup the methods together according to their usage, and renaming some of them as needed (to prevent misleading names). However, most of the web…
JBG
  • 1,044
  • 1
  • 7
  • 7
88
votes
5 answers

How to deprecate a method in Objective-C

We have our library we ship to our customers, and I'd like to mark some methods as "deprecated" because we changed them (like Apple does in the iPhone SDK). I've seen the __OSX_AVAILABLE_BUT_DEPRECATED pre-processor macro, which is mapped to…
Julien
  • 9,312
  • 10
  • 63
  • 86
87
votes
4 answers

Understanding why super() is deprecated in a React class component

I'm new to React and I'm learning about the React component lifecycle with the latest version of React. My "super" call of the partial code below is flagged with the deprecated warning shown. I've had trouble understanding this one, as a lot of…
Steven
  • 893
  • 1
  • 5
  • 8
87
votes
4 answers

'automaticallyAdjustsScrollViewInsets' was deprecated in iOS 11.0

I just started compiling up to iOS 11 and noticed that Apple now declared the property var automaticallyAdjustsScrollViewInsets: Bool { get set } as being…
Lepidopteron
  • 6,056
  • 5
  • 41
  • 53
85
votes
8 answers

Is there a shorter replacement for Kotlin's deprecated String.capitalize() function?

Kotlin deprecated the capitalize function on String class, and their suggested replacement is obnoxiously long. This is an example of a situation where they made the right call on deprecating it, but the wrong call on the user experience. For…
Stevey
  • 2,822
  • 1
  • 23
  • 30
85
votes
5 answers

Should I use JavaDoc deprecation or the annotation in Java?

There are at the moment, two ways to mark code as depreacted in java. Via JavaDoc /** * @deprecated */ Or as an annotation: @Deprecated This is my problem - I find it a bit too much to declare both, when marking a method as deprecated when using…
corgrath
  • 11,673
  • 15
  • 68
  • 99
83
votes
2 answers

Preparation for std::iterator Being Deprecated

On March 21st the standards committee voted to approve the deprecation of std::iterator proposed in P0174: The long sequence of void arguments is much less clear to the reader than simply providing the expected typedefs in the class definition…
Jonathan Mee
  • 37,899
  • 23
  • 129
  • 288
83
votes
2 answers

UILineBreakModeWordWrap is deprecated

Here's my code: CGSize s = [string sizeWithFont:[UIFont systemFontOfSize:20] constrainedToSize:CGSizeMake(self.view.bounds.size.width - 40, CGFLOAT_MAX) // - 40 For cell padding …
Drakesinmoue
  • 895
  • 1
  • 6
  • 11
81
votes
6 answers

MockitoJUnitRunner is deprecated

I'm trying to make a unit test with @InjectMocks and @Mock. @RunWith(MockitoJUnitRunner.class) public class ProblemDefinitionTest { @InjectMocks ProblemDefinition problemDefinition; @Mock Matrix matrixMock; @Test …
Albert Hendriks
  • 1,979
  • 3
  • 25
  • 45