Skip to content

Commit

Permalink
Merge pull request #937 from nurkiewicz/patch-2
Browse files Browse the repository at this point in the history
Support for publishing metrics of BigInteger and BigDecimal type
  • Loading branch information
ryantenney committed Apr 11, 2016
2 parents e79afb8 + 7cfc23c commit 1668978
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -5,6 +5,8 @@
import org.slf4j.LoggerFactory;

import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Locale;
import java.util.Map;
import java.util.SortedMap;
Expand Down Expand Up @@ -297,7 +299,10 @@ private String format(Object o) {
return format(((Integer) o).longValue());
} else if (o instanceof Long) {
return format(((Long) o).longValue());
}
} else if (o instanceof BigInteger) {
return format(((BigInteger) o).doubleValue());
} else if (o instanceof BigDecimal) {
return format(((BigDecimal) o).doubleValue()); }
return null;
}

Expand Down

0 comments on commit 1668978

Please sign in to comment.