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/03/10 02:04:47 UTC

[GitHub] [incubator-eventmesh] Alonexc opened a new issue, #3404: [Enhancement] Use isEmpty() to check whether the collection is empty or not.[ ShowListenClientByTopicHandler]

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

   ### 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/224203706-775ff58d-a7ad-47b2-b04d-05e705e70ae0.png)
   located at:
   eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/admin/handler/ShowListenClientByTopicHandler.java line 71
   analysis and explanation:
   Using Collection.size() to test for emptiness works, but using Collection.isEmpty() makes the code more readable and can be more performant. The time complexity of any isEmpty() method implementation should be O(1) whereas some implementations of size() can be O(n).
   
   
   ### Describe the solution you'd like
   
   use Collection.isEmpty().
   
   ### 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] KamToHung commented on issue #3404: [Enhancement] Use isEmpty() to check whether the collection is empty or not.[ ShowListenClientByTopicHandler]

Posted by "KamToHung (via GitHub)" <gi...@apache.org>.
KamToHung commented on issue #3404:
URL: https://github.com/apache/incubator-eventmesh/issues/3404#issuecomment-1463608113

   please assign to me


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


[GitHub] [incubator-eventmesh] xwm1992 closed issue #3404: [Enhancement] Use isEmpty() to check whether the collection is empty or not.[ ShowListenClientByTopicHandler]

Posted by "xwm1992 (via GitHub)" <gi...@apache.org>.
xwm1992 closed issue #3404: [Enhancement] Use isEmpty() to check whether the collection is empty or not.[ ShowListenClientByTopicHandler]
URL: https://github.com/apache/incubator-eventmesh/issues/3404


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


[GitHub] [incubator-eventmesh] Alonexc commented on issue #3404: [Enhancement] Use isEmpty() to check whether the collection is empty or not.[ ShowListenClientByTopicHandler]

Posted by "Alonexc (via GitHub)" <gi...@apache.org>.
Alonexc commented on issue #3404:
URL: https://github.com/apache/incubator-eventmesh/issues/3404#issuecomment-1465334188

   @KamToHung Welcome, you can submit a pr first.


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