aboutsummaryrefslogtreecommitdiffstats
path: root/metrics-proxy/src/main
diff options
context:
space:
mode:
authorgjoranv <gv@verizonmedia.com>2022-09-27 11:24:32 +0200
committergjoranv <gv@verizonmedia.com>2022-09-27 11:24:32 +0200
commitfa6bfa661c0c04460bbeeedcfb970ab6368f71de (patch)
tree186ce154c736ab449d5328ee4ec3a507685de57b /metrics-proxy/src/main
parente4507a9e813e0eab970422a2f4df0c4c60a5e5e1 (diff)
Require non-null consumer id
+ remove redundant import
Diffstat (limited to 'metrics-proxy/src/main')
-rw-r--r--metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/model/ConsumerId.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/model/ConsumerId.java b/metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/model/ConsumerId.java
index 693a1217119..12da0f7dcea 100644
--- a/metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/model/ConsumerId.java
+++ b/metrics-proxy/src/main/java/ai/vespa/metricsproxy/metric/model/ConsumerId.java
@@ -1,7 +1,6 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package ai.vespa.metricsproxy.metric.model;
-import java.util.Locale;
import java.util.Objects;
/**
@@ -10,7 +9,9 @@ import java.util.Objects;
public class ConsumerId {
public final String id;
- private ConsumerId(String id) { this.id = id; }
+ private ConsumerId(String id) {
+ this.id = Objects.requireNonNull(id);
+ }
public static ConsumerId toConsumerId(String id) { return new ConsumerId(id); }