You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by mi...@apache.org on 2022/10/31 02:15:22 UTC

[incubator-eventmesh] branch master updated: [ISSUE #1700] add NPE check

This is an automated email from the ASF dual-hosted git repository.

mikexue pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git


The following commit(s) were added to refs/heads/master by this push:
     new a348cb2d [ISSUE #1700] add NPE check
     new be3d467a Merge pull request #1965 from jayabha-jayas/master
a348cb2d is described below

commit a348cb2d564557cd274230f79a23d37f75832606
Author: jayabharathi-jb <ja...@gmail.com>
AuthorDate: Thu Oct 27 14:34:53 2022 +0530

    [ISSUE #1700] add NPE check
---
 .../runtime/core/protocol/http/processor/BatchSendMessageProcessor.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/BatchSendMessageProcessor.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/BatchSendMessageProcessor.java
index 6ea2e08c..91106855 100644
--- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/BatchSendMessageProcessor.java
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/BatchSendMessageProcessor.java
@@ -139,7 +139,7 @@ public class BatchSendMessageProcessor implements HttpRequestProcessor {
                 return;
             }
 
-            String content = new String(event.getData().toBytes(), StandardCharsets.UTF_8);
+            String content = event.getData() == null ? "" : new String(event.getData().toBytes(), StandardCharsets.UTF_8);
             if (content.length() > eventMeshHTTPServer.getEventMeshHttpConfiguration().eventMeshEventSize) {
                 batchMessageLogger.error("Event size exceeds the limit: {}",
                     eventMeshHTTPServer.getEventMeshHttpConfiguration().eventMeshEventSize);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org