From b417670877ec11bf28531f9c2e87825ff85a42c5 Mon Sep 17 00:00:00 2001 From: tomsun28 Date: Tue, 5 Dec 2023 17:53:05 +0800 Subject: [PATCH] bugfix CalculateAlarm execAlertExpression NPE (#1388) Signed-off-by: tomsun28 --- .../org/dromara/hertzbeat/alert/calculate/CalculateAlarm.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alerter/src/main/java/org/dromara/hertzbeat/alert/calculate/CalculateAlarm.java b/alerter/src/main/java/org/dromara/hertzbeat/alert/calculate/CalculateAlarm.java index a2ec3a5d3db..a55a6b015d5 100644 --- a/alerter/src/main/java/org/dromara/hertzbeat/alert/calculate/CalculateAlarm.java +++ b/alerter/src/main/java/org/dromara/hertzbeat/alert/calculate/CalculateAlarm.java @@ -315,7 +315,7 @@ private boolean execAlertExpression(Map fieldValueMap, String ex } catch (Exception e) { log.error("Alert Define Rule: {} Run Error: {}.", e, e.getMessage()); } - return match; + return match != null && match; } private void handlerAvailableMetrics(long monitorId, String app, CollectRep.MetricsData metricsData) {