diff --git a/metrics/metrics-prometheus/src/main/java/com/alipay/sofa/rpc/metrics/prometheus/SofaRpcMetricsCollector.java b/metrics/metrics-prometheus/src/main/java/com/alipay/sofa/rpc/metrics/prometheus/SofaRpcMetricsCollector.java index 4c872bbc6..2a5171a3d 100644 --- a/metrics/metrics-prometheus/src/main/java/com/alipay/sofa/rpc/metrics/prometheus/SofaRpcMetricsCollector.java +++ b/metrics/metrics-prometheus/src/main/java/com/alipay/sofa/rpc/metrics/prometheus/SofaRpcMetricsCollector.java @@ -200,9 +200,9 @@ public void close() throws Exception { EventBus.unRegister(ConsumerSubEvent.class, subscriber); } - private static Long getLongAvoidNull(Object object) { + private static long getLongAvoidNull(Object object) { if (object == null) { - return null; + return 0L; } if (object instanceof Integer) {