Skip to content

Commit

Permalink
fix return type (#3284)
Browse files Browse the repository at this point in the history
  • Loading branch information
mjaow authored and beiwei30 committed Jan 21, 2019
1 parent cb59913 commit bcb6eee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions dubbo-common/src/main/java/org/apache/dubbo/common/URL.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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)) {
Expand All @@ -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)) {
Expand Down

0 comments on commit bcb6eee

Please sign in to comment.