Merge branch '1.5.x'

This commit is contained in:
Andy Wilkinson
2017-01-10 17:05:09 -05:00
5 changed files with 29 additions and 38 deletions

View File

@@ -41,22 +41,20 @@ public class InMemoryRichGaugeRepository implements RichGaugeRepository {
@Override
public void set(Metric<?> metric) {
final String name = metric.getName();
final double value = metric.getValue().doubleValue();
this.repository.update(name, new Callback<RichGauge>() {
@Override
public RichGauge modify(RichGauge current) {
if (current == null) {
current = new RichGauge(name, value);
}
else {
current.set(value);
return new RichGauge(name, value);
}
current.set(value);
return current;
}
});
});
}
@Override