You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ta...@apache.org on 2023/07/05 02:06:28 UTC
[iotdb] branch master updated: Fix npe exception when invalid in metric module (#10443)
This is an automated email from the ASF dual-hosted git repository.
tanxinyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new f0a42af6ccb Fix npe exception when invalid in metric module (#10443)
f0a42af6ccb is described below
commit f0a42af6ccbdbe086897553cc8b3fa1aeb3a6225
Author: ZhangHongYin <46...@users.noreply.github.com>
AuthorDate: Wed Jul 5 10:06:23 2023 +0800
Fix npe exception when invalid in metric module (#10443)
---
.../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);
}