You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2022/03/03 03:34:38 UTC

[incubator-inlong] branch master updated: [INLONG-2849][Manager] Fix NPE in Manager Client (#2850)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 522a0bf  [INLONG-2849][Manager] Fix NPE in Manager Client (#2850)
522a0bf is described below

commit 522a0bf109390a1ef7b929356608a6e49303c610
Author: kipshi <48...@users.noreply.github.com>
AuthorDate: Thu Mar 3 11:34:33 2022 +0800

    [INLONG-2849][Manager] Fix NPE in Manager Client (#2850)
---
 .../java/org/apache/inlong/manager/client/api/util/InlongParser.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/util/InlongParser.java b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/util/InlongParser.java
index 89f891c..6ccfdf4 100644
--- a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/util/InlongParser.java
+++ b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/util/InlongParser.java
@@ -133,7 +133,7 @@ public class InlongParser {
         InlongGroupApproveRequest groupApproveInfo = GsonUtil.fromJson(groupJson.toString(),
                 InlongGroupApproveRequest.class);
         JsonObject mqExtInfo = groupJson.getAsJsonObject(mqExtInfoField);
-        if (mqExtInfo.get("middlewareType") != null
+        if (mqExtInfo != null && mqExtInfo.get("middlewareType") != null
                 && Constant.MIDDLEWARE_PULSAR.equals(mqExtInfo.get("middlewareType").getAsString())) {
             InlongGroupPulsarInfo pulsarInfo = GsonUtil.fromJson(mqExtInfo.toString(), InlongGroupPulsarInfo.class);
             groupApproveInfo.setAckQuorum(pulsarInfo.getAckQuorum());