From c118cc22db3c076d5a253a3587668040169df6ed Mon Sep 17 00:00:00 2001 From: Scott Opell Date: Wed, 27 Dec 2023 16:37:35 -0500 Subject: [PATCH] Fixes whoopsie --- src/main/java/org/datadog/jmxfetch/Instance.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/datadog/jmxfetch/Instance.java b/src/main/java/org/datadog/jmxfetch/Instance.java index 81a645e71..e5f3327b5 100644 --- a/src/main/java/org/datadog/jmxfetch/Instance.java +++ b/src/main/java/org/datadog/jmxfetch/Instance.java @@ -579,7 +579,7 @@ public boolean timeToCollect() { } } - private synchronized void addMatchingAttributesForBean( + private synchronized int addMatchingAttributesForBean( ObjectName beanName, MBeanInfo info, boolean metricReachedPreviouslyDisplayed @@ -777,7 +777,7 @@ public synchronized void trackBean(ObjectName beanName) { log.debug("Bean registered event. {}", beanName); String className; MBeanAttributeInfo[] attributeInfos; - int matchedAttributesForBean; + int matchedAttributesForBean = 0; try { log.debug("Getting bean info for bean: {}", beanName); MBeanInfo info = connection.getMBeanInfo(beanName);