Skip to content

Commit 75d04ae

Browse files
authored
Avoid having null pointers error when the context is missing (#438)
1 parent 6e191f5 commit 75d04ae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

validator/src/main/java/com/amazon/aoc/validators/CWMetricValidator.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ public void validate() throws Exception {
7373
Set<String> skippedDimensionNameList = new HashSet<>();
7474
for (Metric metric : expectedMetricList) {
7575
for (Dimension dimension : metric.getDimensions()) {
76+
77+
if (dimension.getValue() == null || dimension.getValue().equals("")) {
78+
continue;
79+
}
80+
7681
if (dimension.getValue().equals("SKIP")) {
7782
skippedDimensionNameList.add(dimension.getName());
7883
}

0 commit comments

Comments
 (0)