What does “This method is deprecated” mean for application developers

后端 未结 5 1400
[愿得一人]
[愿得一人] 2020-12-01 11:59

I see quite a few good old useful methods or even entire classes being \"deprecated and obsolete\".

But code that used to call those methods continues to work. So,

5条回答
  •  余生分开走
    2020-12-01 12:34

    It usually means that there's either a better way of doing things or that the deprecated functionality had some irreparable flaw and should be avoided. You can usually keep using deprecated methods, but you are advised to either switch to some new API (in the first case) or find some other way of doing what you want (in the second).

    Regarding onNewPicture in particular, the entire PictureListener interface is deprecated. There's no sign of what, if anything, is supposed to replace it. A comment by @CommonsWare in this thread is food for thought:

    It is conceivable that upstream changes in WebKit are driving the deprecation and that support for PictureListener might be totally lost in some future release.

提交回复
热议问题