Alonexc opened a new issue, #4262: URL: https://github.com/apache/eventmesh/issues/4262
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no similar issues. ### Enhancement Request     located at: eventmesh-common/src/main/java/org/apache/eventmesh/common/protocol/grpc/common/EventMeshCloudEventUtils.java analysis and explanation: 1. Repeated code operations can be accomplished using a single method. 2. Passing a non-null argument to 'Optional'.[366,383] 3. Condition 'protoData == null' and 'binaryData == null' is always 'false'.[370,374] 4. 'return' is unnecessary as the last statement in a 'void' method[416] ### Describe the solution you'd like 1. Extract as a method.  2. Replace with 'Optional.of()'  3. Remove  4. Remove unnecessary `return`. ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! -- 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]
