dipankr commented on PR #3709: URL: https://github.com/apache/eventmesh/pull/3709#issuecomment-1505550152
I was able to replace the if/else-if with a switch case and get rid of StringUtils.equals method because: in our case the comparisons are against SpecVersion.V1 / SpecVersion.V03, which is not null so we do not require the case of StringUtils.equals(null, null) to be true as we never compare against null. We can get away using a simple String comparison used in the switch(). for reference (source: apache commons lang doc): <img width="791" alt="Screenshot" src="https://user-images.githubusercontent.com/42119635/231517292-c36c63eb-eef8-4689-8789-d538e392be8c.png"> -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
