You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "woosung1223 (via GitHub)" <gi...@apache.org> on 2024/11/19 06:22:09 UTC

[PR] refactor generateExtNameAssignment to better structure [dubbo]

woosung1223 opened a new pull request, #14918:
URL: https://github.com/apache/dubbo/pull/14918

   ## 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.
   - When I ran the test code that was already written, it worked fine.
   
   <img width="336" alt="image" src="https://github.com/user-attachments/assets/2d128fc7-1c61-48cf-bde3-17e8ce3eebd9">
   
   
   ## Checklist
   - [x] Make sure there is a [GitHub_issue](https://github.com/apache/dubbo/issues) 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](https://github.com/apache/dubbo-samples) project.
   - [x] Make sure gitHub actions can pass. [Why the workflow is failing and how to fix it?](./CONTRIBUTING.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] refactor generateExtNameAssignment to better structure [dubbo]

Posted by "wcy666103 (via GitHub)" <gi...@apache.org>.
wcy666103 commented on PR #14918:
URL: https://github.com/apache/dubbo/pull/14918#issuecomment-2484802082

   use `mvn spotless:apply` to format the code.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] refactor generateExtNameAssignment to better structure [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on PR #14918:
URL: https://github.com/apache/dubbo/pull/14918#issuecomment-2488012298

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] refactor generateExtNameAssignment to better structure [dubbo]

Posted by "woosung1223 (via GitHub)" <gi...@apache.org>.
woosung1223 commented on PR #14918:
URL: https://github.com/apache/dubbo/pull/14918#issuecomment-2484869626

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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


Re: [PR] refactor generateExtNameAssignment to better structure [dubbo]

Posted by "zrlw (via GitHub)" <gi...@apache.org>.
zrlw commented on PR #14918:
URL: https://github.com/apache/dubbo/pull/14918#issuecomment-2999359762

   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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org