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/27 07:30:58 UTC
[incubator-eventmesh] branch master updated: [ISSUE #1703] 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 56a60d4a [ISSUE #1703] add NPE check
new 81e36857 Merge pull request #1922 from jayabha-jayas/master
56a60d4a is described below
commit 56a60d4a26c8809cfb97b2c233081acd4b7f0933
Author: jayabharathi-jb <ja...@gmail.com>
AuthorDate: Wed Oct 26 20:01:46 2022 +0530
[ISSUE #1703] add NPE check
---
.../runtime/core/protocol/http/processor/ReplyMessageProcessor.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/ReplyMessageProcessor.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/ReplyMessageProcessor.java
index f6abaf6c..a3e1b83d 100644
--- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/ReplyMessageProcessor.java
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/http/processor/ReplyMessageProcessor.java
@@ -152,7 +152,7 @@ public class ReplyMessageProcessor 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) {
httpLogger.error("Event size exceeds the limit: {}",
eventMeshHTTPServer.getEventMeshHttpConfiguration().eventMeshEventSize);
@@ -182,7 +182,7 @@ public class ReplyMessageProcessor implements HttpRequestProcessor {
String origTopic = event.getSubject();
- final String replyMQCluster = event.getExtension(EventMeshConstants.PROPERTY_MESSAGE_CLUSTER).toString();
+ final String replyMQCluster = event.getExtension(EventMeshConstants.PROPERTY_MESSAGE_CLUSTER) == null ? "" : event.getExtension(EventMeshConstants.PROPERTY_MESSAGE_CLUSTER).toString();
if (!org.apache.commons.lang3.StringUtils.isEmpty(replyMQCluster)) {
replyTopic = replyMQCluster + "-" + replyTopic;
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org