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/07/06 08:23:25 UTC
[I] [Enhancement] Do some code optimization.[EventMeshConsumer] (eventmesh)
Alonexc opened a new issue, #4190:
URL: https://github.com/apache/eventmesh/issues/4190
### 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-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/consumer/EventMeshConsumer.java line
analysis and explanation:
a. transient is used to mark fields in a Serializable class which will not be written out to file (or stream). In a class that does not implement Serializable, this modifier is simply wasted keystrokes, and should be removed.
b. This block of commented-out lines of code should be removed.[line 209]
c. For enum type judgments, switch is more efficient than if-else.[line 204-211,217-223,228-234]
d. Excessive lambda usage[line 247,249]
### Describe the solution you'd like
a. Implements Serializable

b. Delete the commented out code.
c. Use switch instead.

d. Use ‘orElse()’ method

### 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: issues-unsubscribe@eventmesh.apache.org.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
Re: [I] [Enhancement] Do some code optimization.[EventMeshConsumer] (eventmesh)
Posted by "xwm1992 (via GitHub)" <gi...@apache.org>.
xwm1992 closed issue #4190: [Enhancement] Do some code optimization.[EventMeshConsumer]
URL: https://github.com/apache/eventmesh/issues/4190
--
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