Alonexc opened a new issue, #4267:
URL: https://github.com/apache/eventmesh/issues/4267

   ### 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
   
   
![image](https://github.com/apache/eventmesh/assets/91315508/07e25a9c-ba02-4063-8fe3-797e2d544339)
   
![image](https://github.com/apache/eventmesh/assets/91315508/83934183-f6e9-4b6e-ae02-77cc361ebeb7)
   located at:
   
eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/src/main/java/org/apache/eventmesh/protocol/cloudevents/resolver/grpc/GrpcEventMeshCloudEventProtocolResolver.java
 line 43,51,60
   analysis and explanation:
   a. Immediately return this expression instead of assigning it to the 
temporary variable "event".
   b. Method invocation 'deserialize' may produce 'NullPointerException'
   
   
   ### Describe the solution you'd like
   
   Inline variable and use Objects.requireNonNull()
   
![image](https://github.com/apache/eventmesh/assets/91315508/35864e11-8a07-4b59-9d53-11b081913ebb)
   
![image](https://github.com/apache/eventmesh/assets/91315508/9cd8db7a-6180-4716-b330-0ea9e7726a9c)
   
   
   ### 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]

Reply via email to