You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by ch...@apache.org on 2022/10/23 06:57:48 UTC

[incubator-eventmesh] branch master updated: Fix NPE

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

chenguangsheng 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 1ff17376 Fix NPE
     new 70edd69d Merge pull request #1761 from rrpari/patch-4
1ff17376 is described below

commit 1ff1737627424cf804818782015ce439c905e72d
Author: Pari Rajarathinam <74...@users.noreply.github.com>
AuthorDate: Sun Oct 23 11:10:14 2022 +0530

    Fix NPE
---
 .../runtime/core/protocol/tcp/client/session/push/ClientAckContext.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/session/push/ClientAckContext.java b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/session/push/ClientAckContext.java
index ffcf9368..fce985a4 100644
--- a/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/session/push/ClientAckContext.java
+++ b/eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/tcp/client/session/push/ClientAckContext.java
@@ -55,7 +55,7 @@ public class ClientAckContext {
         this.events = events;
         this.consumer = consumer;
         this.createTime = System.currentTimeMillis();
-        String ttlStr = events.get(0).getExtension(EventMeshConstants.PROPERTY_MESSAGE_TTL).toString();
+        String ttlStr = events.get(0).getExtension(EventMeshConstants.PROPERTY_MESSAGE_TTL) == null ? "" : events.get(0).getExtension(EventMeshConstants.PROPERTY_MESSAGE_TTL).toString();
         long ttl = StringUtils.isNumeric(ttlStr) ? Long.parseLong(ttlStr) : EventMeshConstants.DEFAULT_TIMEOUT_IN_MILLISECONDS;
         this.expireTime = System.currentTimeMillis() + ttl;
     }


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