Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

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

Deprecaated 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.

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

It was a documentation bug. (And it has been fixed!)

The Deprecated annotation is not really deprecated.

Apparently what happened is that the source code for Deprecated contained this in its javadoc comments:

 * @apiNote
 * It is strongly recommended that the reason for deprecating a program element
 * be explained in the documentation, using the {@code @deprecated}
 * javadoc tag. 

Apparently, the {@code @deprecated} was interpreted as an @deprecated javadoc tag by the metalava tool. This caused metalava to inject the "missing" @Deprecated annotations into the ".class" files in the Android JAR file. Presumably, the injected annotation was then incorporated into the generated javadocs on the website.

Kudos to Manohar Reddy for finding the bug in the issue tracker.

You can find the fix that they made here.


For what it is worth, java.lang.Deprecated is a class that originates in the Oracle / OpenJDK Java (i.e. standard Java) class libraries. Android wouldn't / shouldn't deliberately deprecate it without a very good reason. It would create another hurdle to Java <-> Android portability.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!