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/10/25 11:44:16 UTC

[GitHub] [incubator-eventmesh] KxxxxxX opened a new pull request, #1847: [ISSUE #1845]

KxxxxxX opened a new pull request, #1847:
URL: https://github.com/apache/incubator-eventmesh/pull/1847

   Fixes #1845 .
   
   ### Motivation
   
   located at:
   org/apache/eventmesh/connector/knative/cloudevent/impl/KnativeBinaryMessageReader.java line 34
   explanation:
   This line has the form String str = str.equals("someOtherString")
   If the string variable str is null, a NullPointerException may occur. if the code is adapted to String str = "someOtherString".equals(str)
   That is, if you call equals() on a string literal, passing the variable as an argument, then this exception will not occur because equals() will check for null.
   
   
   
   ### Modifications
   
   before 
   ```java
       @Override
       protected boolean isContentTypeHeader(String key) {
           return key.equals(KnativeHeaders.CONTENT_TYPE);
       }
   ```
   
   after
   ```java
      @Override
       protected boolean isContentTypeHeader(String key) {
           return KnativeHeaders.CONTENT_TYPE.equals(key);
       }
   ```
   
   
   
   ### Documentation
   
   - Does this pull request introduce a new feature?  no
   
   
   
   
   
   
   


-- 
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] MajorHe1 merged pull request #1847: [ISSUE #1845]Method makes literal string comparisons passing the literal as an argument

Posted by GitBox <gi...@apache.org>.
MajorHe1 merged PR #1847:
URL: https://github.com/apache/incubator-eventmesh/pull/1847


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