From 9cc9e05b163f13846ad8185c2440dc6e733bcdb1 Mon Sep 17 00:00:00 2001 From: Jonathan Coustick Date: Wed, 30 Oct 2019 15:44:21 +0000 Subject: [PATCH] PAYARA-4147 MP Metrics now use double for MBean metrics instead of long This issue was causing CPU load to be displayed as 0. Fixes #4230 --- .../payara/microprofile/metrics/jmx/MBeanGuageImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appserver/payara-appserver-modules/microprofile/metrics/src/main/java/fish/payara/microprofile/metrics/jmx/MBeanGuageImpl.java b/appserver/payara-appserver-modules/microprofile/metrics/src/main/java/fish/payara/microprofile/metrics/jmx/MBeanGuageImpl.java index 7d0f1701448..bc5fde928ec 100644 --- a/appserver/payara-appserver-modules/microprofile/metrics/src/main/java/fish/payara/microprofile/metrics/jmx/MBeanGuageImpl.java +++ b/appserver/payara-appserver-modules/microprofile/metrics/src/main/java/fish/payara/microprofile/metrics/jmx/MBeanGuageImpl.java @@ -47,7 +47,7 @@ * @author jonathan coustick * @since 5.193 */ -public class MBeanGuageImpl implements Gauge { +public class MBeanGuageImpl implements Gauge { private final MBeanExpression mBean; @@ -56,7 +56,7 @@ public MBeanGuageImpl(MBeanExpression mBean) { } @Override - public Long getValue() { - return mBean.getNumberValue().longValue(); + public Double getValue() { + return mBean.getNumberValue().doubleValue(); } }