summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--simplemetrics/src/main/java/com/yahoo/metrics/simple/jdisc/SimpleMetricConsumer.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/simplemetrics/src/main/java/com/yahoo/metrics/simple/jdisc/SimpleMetricConsumer.java b/simplemetrics/src/main/java/com/yahoo/metrics/simple/jdisc/SimpleMetricConsumer.java
index 7f5571418fe..fd98ffe848f 100644
--- a/simplemetrics/src/main/java/com/yahoo/metrics/simple/jdisc/SimpleMetricConsumer.java
+++ b/simplemetrics/src/main/java/com/yahoo/metrics/simple/jdisc/SimpleMetricConsumer.java
@@ -1,6 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.metrics.simple.jdisc;
+import java.util.HashMap;
import java.util.Map;
import com.yahoo.jdisc.Metric.Context;
@@ -45,11 +46,9 @@ public class SimpleMetricConsumer implements MetricConsumer {
@Override
public Context createContext(Map<String, ?> properties) {
- if (properties == null) {
- return null;
- } else {
- return new Point(properties);
- }
+ if (properties == null)
+ properties = new HashMap<>();
+ return new Point(properties);
}
}