Skip to content

Commit

Permalink
config Parameter can't be null (childe#143)
Browse files Browse the repository at this point in the history
config Parameter can't be null
  • Loading branch information
gnuhpc authored Nov 19, 2019
2 parents 4ece557 + 63ce2c5 commit 81b2ef3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.codahale.metrics.Meter;
import com.ctrip.ops.sysdev.exception.YamlConfigException;
import com.ctrip.ops.sysdev.metric.Metric;
import lombok.NonNull;

import java.util.Map;

Expand All @@ -14,7 +15,7 @@ public class Base {
protected boolean enableMeter = false;
protected Meter meter;

public Base(Map config) {
public Base(@NonNull Map config) {
if (config.containsKey("meter_name")) {
this.enableMeter = true;
meter = Metric.setMetric((String) config.get("meter_name"));
Expand Down

0 comments on commit 81b2ef3

Please sign in to comment.