From 3174c81578024d85385531c33df10de31d4fd9b4 Mon Sep 17 00:00:00 2001 From: Albert Vaca Date: Tue, 20 Aug 2019 18:35:16 +0200 Subject: [PATCH] Hack to handle attributes with types preceded by "class" --- src/main/java/org/datadog/jmxfetch/Instance.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/datadog/jmxfetch/Instance.java b/src/main/java/org/datadog/jmxfetch/Instance.java index 592704df0..dda77c122 100644 --- a/src/main/java/org/datadog/jmxfetch/Instance.java +++ b/src/main/java/org/datadog/jmxfetch/Instance.java @@ -45,7 +45,18 @@ public class Instance { "java.lang.Object", "java.lang.Boolean", "boolean", - "java.lang.Number"); + "java.lang.Number", + //Workaround for jasperserver, which returns attribute types as `class ` + "class java.lang.String", + "class java.lang.Double", + "class java.lang.Float", + "class java.lang.Integer", + "class java.lang.Long", + "class java.util.concurrent.atomic.AtomicInteger", + "class java.util.concurrent.atomic.AtomicLong", + "class java.lang.Object", + "class java.lang.Boolean", + "class java.lang.Number"); private static final List COMPOSED_TYPES = Arrays.asList( "javax.management.openmbean.CompositeData",