You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by "Alonexc (via GitHub)" <gi...@apache.org> on 2023/02/10 06:54:58 UTC

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

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

   ### 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/218018616-917d1022-dc2d-4b80-a5d2-b32503f3fe6a.png)
   located at:
   eventmesh-common/src/main/java/org/apache/eventmesh/common/config/convert/ConvertValue.java line 61
   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().
   e.g.
   ![image](https://user-images.githubusercontent.com/91315508/218018657-6aed3063-976f-4e45-9502-56c22c209ee7.png)
   
   
   ### 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] mytang0 closed issue #3082: [Enhancement] Method uses immediate execution of a block of code that is often not used

Posted by "mytang0 (via GitHub)" <gi...@apache.org>.
mytang0 closed issue #3082: [Enhancement] Method uses immediate execution of a block of code that is often not used
URL: https://github.com/apache/incubator-eventmesh/issues/3082


-- 
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