You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@eventmesh.apache.org by "Alonexc (via GitHub)" <gi...@apache.org> on 2023/04/13 07:13:33 UTC

[GitHub] [eventmesh] Alonexc commented on pull request #3709: [ISSUE #3653] refactored code and extracted method

Alonexc commented on PR #3709:
URL: https://github.com/apache/eventmesh/pull/3709#issuecomment-1506466860

   switch is doing string comparison, the condition of case must be a constant to work, and according to the underlying code, this class is of enum type.
   ![image](https://user-images.githubusercontent.com/91315508/231650602-dadfc89c-e47e-4568-b325-9c25a7d67776.png)
   
   If you want to use switch instead, I have a suggestion:
   ![image](https://user-images.githubusercontent.com/91315508/231681576-fa9bc86e-1e5b-4f9f-87cb-3cf797d14182.png)
   
   Use this method in the SpecVersion class.It is possible to not declare constants.
   ![image](https://user-images.githubusercontent.com/91315508/231681623-5680aa8e-30a1-4a30-9a07-841498ff4ef4.png)
   
   Please correct me if there are any errors.
   


-- 
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: issues-unsubscribe@eventmesh.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: issues-help@eventmesh.apache.org