You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by sp...@apache.org on 2023/07/04 15:14:36 UTC
[iotdb] branch fix/metric_invalid_npe created (now 3ee4dca8934)
This is an automated email from the ASF dual-hosted git repository.
spricoder pushed a change to branch fix/metric_invalid_npe
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at 3ee4dca8934 Fix NPE Exception
This branch includes the following new commits:
new 3ee4dca8934 Fix NPE Exception
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[iotdb] 01/01: Fix NPE Exception
Posted by sp...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
spricoder pushed a commit to branch fix/metric_invalid_npe
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 3ee4dca8934e73bd9e591456ccee30bad2457c69
Author: spricoder <sp...@qq.com>
AuthorDate: Tue Jul 4 23:14:13 2023 +0800
Fix NPE Exception
---
.../src/main/java/org/apache/iotdb/metrics/AbstractMetricManager.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricManager.java b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricManager.java
index 66c4fae54d1..7e224505631 100644
--- a/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricManager.java
+++ b/iotdb-core/metrics/interface/src/main/java/org/apache/iotdb/metrics/AbstractMetricManager.java
@@ -441,10 +441,10 @@ public abstract class AbstractMetricManager {
if (!isEnableMetricInGivenLevel(metricLevel)) {
return true;
}
- if (!nameToMetaInfo.containsKey(name)) {
+ MetricInfo.MetaInfo metaInfo = nameToMetaInfo.get(name);
+ if (metaInfo == null) {
return false;
}
- MetricInfo.MetaInfo metaInfo = nameToMetaInfo.get(name);
return !metaInfo.hasSameKey(tags);
}