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/28 06:23:31 UTC

[GitHub] [incubator-eventmesh] skyXJJ opened a new pull request, #1991: [ISSUE #79] Fix NPE

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

   
   Fixes #79
   
   ### Motivation
   Possible null  pointer dereference due to return value of called method [SendMessageRequestProtocolResolver],line 65 and line 84
   
   ### Modifications
   Add null pointer check
   
   
   
   
   
   
   


-- 
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 commented on a diff in pull request #1991: [ISSUE #1992] Possible null pointer dereference due to return value of called method [SendMessageRequestProtocolResolver]

Posted by GitBox <gi...@apache.org>.
xwm1992 commented on code in PR #1991:
URL: https://github.com/apache/incubator-eventmesh/pull/1991#discussion_r1007763601


##########
eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/src/main/java/org/apache/eventmesh/protocol/cloudevents/resolver/http/SendMessageRequestProtocolResolver.java:
##########
@@ -62,6 +62,10 @@ public static CloudEvent buildEvent(Header header, Body body) throws ProtocolHan
 
             CloudEvent event = null;
             if (StringUtils.equals(SpecVersion.V1.toString(), protocolVersion)) {
+                if(EventFormatProvider.getInstance() == null ||

Review Comment:
   please use `Object.requireNonNull` instead of return `null`



##########
eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/src/main/java/org/apache/eventmesh/protocol/cloudevents/resolver/http/SendMessageRequestProtocolResolver.java:
##########
@@ -81,6 +85,10 @@ public static CloudEvent buildEvent(Header header, Body body) throws ProtocolHan
                         .withExtension(SendMessageRequestBody.PRODUCERGROUP, producerGroup)
                         .build();
             } else if (StringUtils.equals(SpecVersion.V03.toString(), protocolVersion)) {
+                if(EventFormatProvider.getInstance() == null ||

Review Comment:
   same as above



-- 
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] skyXJJ commented on a diff in pull request #1991: [ISSUE #1992] Possible null pointer dereference due to return value of called method [SendMessageRequestProtocolResolver]

Posted by GitBox <gi...@apache.org>.
skyXJJ commented on code in PR #1991:
URL: https://github.com/apache/incubator-eventmesh/pull/1991#discussion_r1008657863


##########
eventmesh-protocol-plugin/eventmesh-protocol-cloudevents/src/main/java/org/apache/eventmesh/protocol/cloudevents/resolver/http/SendMessageRequestProtocolResolver.java:
##########
@@ -62,6 +62,10 @@ public static CloudEvent buildEvent(Header header, Body body) throws ProtocolHan
 
             CloudEvent event = null;
             if (StringUtils.equals(SpecVersion.V1.toString(), protocolVersion)) {
+                if(EventFormatProvider.getInstance() == null ||

Review Comment:
   ok.,done. please review again



-- 
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 commented on pull request #1991: [ISSUE #79] Fix NPE

Posted by GitBox <gi...@apache.org>.
xwm1992 commented on PR #1991:
URL: https://github.com/apache/incubator-eventmesh/pull/1991#issuecomment-1294526852

   @skyXJJ please associate the correct issue with the 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

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 merged pull request #1991: [ISSUE #1992] Possible null pointer dereference due to return value of called method [SendMessageRequestProtocolResolver]

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


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