Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deprecated method warn when called by user #11240

Closed
wants to merge 2 commits into from
Closed

Add deprecated method warn when called by user #11240

wants to merge 2 commits into from

Conversation

YczYanchengzhe
Copy link

@YczYanchengzhe YczYanchengzhe commented Jan 5, 2023

What is the purpose of the change

Add deprecated method warn when called by user , related with #10850

Brief changelog

Verifying this change

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

@YczYanchengzhe YczYanchengzhe changed the title Add deprecated method warn when called by user #10850 Add deprecated method warn when called by user Jan 5, 2023
Comment on lines +233 to +234
String CLUSTER_METHOD_DEPRECATED = "2-21";

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please submit a PR related with this code in apache/dubbo-website.

@AlbumenJ
Copy link
Member

AlbumenJ commented Jan 5, 2023

As for #10850, we want to check all of the methods annotated with @Deprecated.

@YczYanchengzhe
Copy link
Author

I have several doubts when I am looking for an abandoned method

  1. How to find abandoned methods? At present, I am looking for all methods that have added @ Deprecated annotation. I find that there are a lot of data that meet the conditions. Is there a better way?

  2. For methods with @ Deprecated, do you need to add logs? If the class is abandoned, do you need to add logs for all methods of the class. For abstract class, final class, and tool class, do you need to add warn logs? For some abandoned get/set methods, do you need to add warn logs?

@AlbumenJ
Copy link
Member

I have several doubts when I am looking for an abandoned method

  1. How to find abandoned methods? At present, I am looking for all methods that have added @ Deprecated annotation. I find that there are a lot of data that meet the conditions. Is there a better way?
  2. For methods with @ Deprecated, do you need to add logs? If the class is abandoned, do you need to add logs for all methods of the class. For abstract class, final class, and tool class, do you need to add warn logs? For some abandoned get/set methods, do you need to add warn logs?

Is it possible to generate some code when compiling to achieve this?

@YczYanchengzhe YczYanchengzhe closed this by deleting the head repository Jun 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants