You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by GitBox <gi...@apache.org> on 2022/12/23 08:48:43 UTC

[GitHub] [incubator-eventmesh] Alonexc opened a new issue, #2657: [Enhancement] Method uses immediate execution of a block of code that is often not used [RemoteSubscribeEventProcessor]

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

   ### 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://user-images.githubusercontent.com/91315508/209291147-da75da31-5ea6-4f7d-896b-ea838321e366.png)
   ![image](https://user-images.githubusercontent.com/91315508/209291155-d3f712a9-af41-4abb-841d-9b57d778c636.png)
   located at:
   eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/RemoteSubscribeEventProcessor.java line 131,151
   analysis and explanation:
   This method uses the Optional.orElse() method passing in some code that will execute immediately, whether or not the else case of the Optional is needed. This may cause incorrect side effects to happen, or at the minimum, code to execute for no reason.
   
   
   ### Describe the solution you'd like
   
   It would be better to use Optional.orElseGet()
   
   ### 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: dev-unsubscribe@eventmesh.apache.org.apache.org

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


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


[GitHub] [incubator-eventmesh] xwm1992 closed issue #2657: [Enhancement] Method uses immediate execution of a block of code that is often not used [RemoteSubscribeEventProcessor]

Posted by GitBox <gi...@apache.org>.
xwm1992 closed issue #2657: [Enhancement] Method uses immediate execution of a block of code that is often not used [RemoteSubscribeEventProcessor]
URL: https://github.com/apache/incubator-eventmesh/issues/2657


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

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


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