fix map metric
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m33s

This commit is contained in:
Lee 2024-04-14 09:48:59 +01:00
parent 8d45ba8cbd
commit 05d0aa500c

View File

@ -18,16 +18,10 @@ public class MapMetric <A, B> extends Metric<Map<A, B>> {
for (Map.Entry<A, B> entry : getValue().entrySet()) {
switch (entry.getValue().getClass().getSimpleName()) {
case "Integer":
point.addField(entry.getKey().toString(), (Integer) entry.getValue());
point.addField(entry.getKey().toString(), (int) entry.getValue());
break;
case "Double":
point.addField(entry.getKey().toString(), (Double) entry.getValue());
break;
case "String":
point.addField(entry.getKey().toString(), (String) entry.getValue());
break;
case "Boolean":
point.addField(entry.getKey().toString(), (Boolean) entry.getValue());
point.addField(entry.getKey().toString(), (double) entry.getValue());
break;
default:
point.addField(entry.getKey().toString(), entry.getValue().toString());