Merge pull request #12032 from dataease/pr@dev-v2@perf_threshold_npe

fix(X-Pack): 阈值告警-可能存在的NPE
This commit is contained in:
fit2cloud-chenyw 2024-09-05 10:16:02 +08:00 committed by GitHub
commit 4787d2857b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -219,7 +219,7 @@ public class ChartViewThresholdManage {
if (ObjectUtils.isEmpty(fieldDTO)) continue;
String fieldDTOName = fieldDTO.getName();
String dataeaseName = fieldDTO.getDataeaseName();
List<String> valueList = rows.stream().map(row -> row.get(dataeaseName).toString()).collect(Collectors.toList());
List<String> valueList = rows.stream().map(row -> ObjectUtils.isEmpty(row.get(dataeaseName)) ? null : row.get(dataeaseName).toString()).collect(Collectors.toList());
String replacement = fieldDTOName + ": " + JsonUtil.toJSONString(valueList);
// 替换文本
matcher.appendReplacement(sb, replacement);

@ -1 +1 @@
Subproject commit 08153f88e0d2cf6bc560a63ab84afdb8339dc6c1
Subproject commit f0301c703bfff22a05b3e38ac49200dae49ac1e9