diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/support/RpcUtils.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/support/RpcUtils.java index 53cd36894de..228392fe021 100644 --- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/support/RpcUtils.java +++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/support/RpcUtils.java @@ -317,7 +317,7 @@ public static Long convertToNumber(Object obj) { timeout = Long.parseLong((String) obj); } else if (obj instanceof Number) { timeout = ((Number) obj).longValue(); - } else { + } else if (obj != null) { timeout = Long.parseLong(obj.toString()); } } catch (Exception e) {