dubbo
dubbo copied to clipboard
refactor generateExtNameAssignment to better structure
What is the purpose of the change?
- Refactored method
generateExtNameAssignmentinAdaptiveClassCodeGeneratorthat was TODO commented. - Previously, this had the disadvantage of poor visibility of the logic.
- However, I have improved readability by using ternary operators, but I'm wondering if this is the right direction to go, or if I should refactor it as a method-by-method separation.
Checklist
- [x] Make sure there is a GitHub_issue field for the change.
- [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [x] Write necessary unit-test to verify your logic correction. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
- [x] Make sure gitHub actions can pass. Why the workflow is failing and how to fix it?
use mvn spotless:apply to format the code.
@wcy666103 thx a lot, I applied code style. I'm appreciated If you check code changes.
Please add some test cases to verify that the results of this method are the same.
i checked the pr codes, they are logical equivalent of origin codes. but i suggest it might be better to refactor it as a method-by-method separation.