From a7bf2f17d45f4d7092ff1721fbb77f1aaccd7b38 Mon Sep 17 00:00:00 2001 From: minjun Date: Mon, 21 Jan 2019 01:08:38 +0800 Subject: [PATCH] fix return type --- dubbo-common/src/main/java/org/apache/dubbo/common/URL.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/URL.java b/dubbo-common/src/main/java/org/apache/dubbo/common/URL.java index cee9c863434..63cee6f7d9b 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/URL.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/URL.java @@ -727,7 +727,7 @@ public double getMethodParameter(String method, String key, double defaultValue) String methodKey = method + "." + key; Number n = getNumbers().get(methodKey); if (n != null) { - return n.intValue(); + return n.doubleValue(); } String value = getMethodParameter(method, key); if (StringUtils.isEmpty(value)) { @@ -742,7 +742,7 @@ public float getMethodParameter(String method, String key, float defaultValue) { String methodKey = method + "." + key; Number n = getNumbers().get(methodKey); if (n != null) { - return n.intValue(); + return n.floatValue(); } String value = getMethodParameter(method, key); if (StringUtils.isEmpty(value)) { @@ -757,7 +757,7 @@ public long getMethodParameter(String method, String key, long defaultValue) { String methodKey = method + "." + key; Number n = getNumbers().get(methodKey); if (n != null) { - return n.intValue(); + return n.longValue(); } String value = getMethodParameter(method, key); if (StringUtils.isEmpty(value)) {