Skip to content

Commit 8ee1896

Browse files
author
Pankaj Agrawal
committed
fix: null check on dimension
1 parent 7cf03ba commit 8ee1896

File tree

1 file changed

+1
-1
lines changed
  • powertools-metrics/src/main/java/software/amazon/lambda/powertools/metrics

1 file changed

+1
-1
lines changed

powertools-metrics/src/main/java/software/amazon/lambda/powertools/metrics/MetricsUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public static DimensionSet defaultDimensionSet() {
110110
}
111111

112112
public static boolean hasDefaultDimension() {
113-
return defaultDimensionSet.getDimensionKeys().size() > 0;
113+
return null != defaultDimensionSet && defaultDimensionSet.getDimensionKeys().size() > 0;
114114
}
115115

116116
private static void captureRequestAndTraceId(MetricsLogger metricsLogger) {

0 commit comments

Comments
 (0)