dubbo icon indicating copy to clipboard operation
dubbo copied to clipboard

refactor generateExtNameAssignment to better structure

Open woosung1223 opened this issue 1 year ago • 4 comments

What is the purpose of the change?

  • Refactored method generateExtNameAssignment in AdaptiveClassCodeGenerator that 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?

woosung1223 avatar Nov 19 '24 06:11 woosung1223

use mvn spotless:apply to format the code.

wcy666103 avatar Nov 19 '24 06:11 wcy666103

@wcy666103 thx a lot, I applied code style. I'm appreciated If you check code changes.

woosung1223 avatar Nov 19 '24 07:11 woosung1223

Please add some test cases to verify that the results of this method are the same.

AlbumenJ avatar Nov 20 '24 09:11 AlbumenJ

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.

zrlw avatar Jun 24 '25 08:06 zrlw