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/02 02:52:28 UTC

[GitHub] [incubator-eventmesh] Alonexc opened a new issue, #3003: [Enhancement] Method makes literal string comparisons passing the literal as an argument [TCPClientHandler]

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

   ### 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/216218858-b464fd93-50af-45ae-a4a0-894b64db0677.png)
   located at:|
   eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/admin/handler/TCPClientHandler.java line 193,196,199
   analysis and explanation:
   This line is in the form of String str = str.equals("someOtherString");
   A NullPointerException may occur if the String variable str is null. If instead the code was restructured to String str = "someOtherString".equals(str);that is, call equals() on the string literal, passing the variable as an argument, then this exception could never happen as both equals() check for null.
   
   
   ### Describe the solution you'd like
   
   Adjust the code to String str = "someOtherString".equals(str).
   
   ### 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] ChelseaChanu commented on issue #3003: [Enhancement] Method makes literal string comparisons passing the literal as an argument [TCPClientHandler]

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

   I like to work in this issue.


-- 
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 #3003: [Enhancement] Method makes literal string comparisons passing the literal as an argument [TCPClientHandler]

Posted by "xwm1992 (via GitHub)" <gi...@apache.org>.
xwm1992 closed issue #3003: [Enhancement] Method makes literal string comparisons passing the literal as an argument [TCPClientHandler]
URL: https://github.com/apache/incubator-eventmesh/issues/3003


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