You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ca...@apache.org on 2022/12/01 10:39:11 UTC
[iotdb] branch beyyes/1.0_fixbug updated: add npe check
This is an automated email from the ASF dual-hosted git repository.
caogaofei pushed a commit to branch beyyes/1.0_fixbug
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/beyyes/1.0_fixbug by this push:
new 828aff0621 add npe check
828aff0621 is described below
commit 828aff0621f00dec74c1fe353b44830dcc9325bd
Author: Beyyes <cg...@foxmail.com>
AuthorDate: Thu Dec 1 18:38:56 2022 +0800
add npe check
---
.../src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java b/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java
index 5954a66221..a061d6c313 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java
@@ -259,6 +259,10 @@ public class ConfigNode implements ConfigNodeMBean {
}
if (status.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
+ if (resp == null) {
+ LOGGER.error("The result of register ConfigNode is empty!");
+ throw new StartupException("The result of register ConfigNode is empty!");
+ }
/* Always set ConfigNodeId before initConsensusManager */
CONF.setConfigNodeId(resp.getConfigNodeId());
configManager.initConsensusManager();