@deprecatedshould be added to the source so that the class / method flag is obsolete. Therefore, you cannot judge the code of another.
However, if you have a better alternative that you prefer to use as your standard in your project, then you can apply this standard in other ways, usually in checkstyle , for example.