Skip to content

Commit a9a03b4

Browse files
Merge 107ee20 into e1e9aca
2 parents e1e9aca + 107ee20 commit a9a03b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

eventmesh-protocol-plugin/eventmesh-protocol-http/src/main/java/org/apache/eventmesh/protocol/http/resolver/HttpRequestProtocolResolver.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import java.util.HashMap;
3131
import java.util.Locale;
3232
import java.util.Map;
33+
import java.util.Objects;
3334
import java.util.UUID;
3435

3536
import io.cloudevents.CloudEvent;
@@ -92,7 +93,7 @@ public static CloudEvent buildEvent(HttpEventWrapper httpEventWrapper) throws Pr
9293
data.put(HttpProtocolConstant.CONSTANTS_KEY_PATH, requestURI);
9394
data.put(HttpProtocolConstant.CONSTANTS_KEY_METHOD, httpEventWrapper.getHttpMethod());
9495
// with data
95-
return builder.withData(JsonUtils.toJSONString(data).getBytes(StandardCharsets.UTF_8)).build();
96+
return builder.withData(Objects.requireNonNull(JsonUtils.toJSONString(data)).getBytes(StandardCharsets.UTF_8)).build();
9697
} catch (Exception e) {
9798
throw new ProtocolHandleException(e.getMessage(), e);
9899
}

0 commit comments

Comments
 (0)