You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2024/05/08 03:51:06 UTC

(dubbo) branch 3.2 updated: Optimize convertToNumber method (#14159)

This is an automated email from the ASF dual-hosted git repository.

albumenj pushed a commit to branch 3.2
in repository https://gitbox.apache.org/repos/asf/dubbo.git


The following commit(s) were added to refs/heads/3.2 by this push:
     new faefee2cb2 Optimize convertToNumber method (#14159)
faefee2cb2 is described below

commit faefee2cb2b64e10ff4f874f6da6e032d84f0ff2
Author: TomlongTK <lo...@maoyan.com>
AuthorDate: Wed May 8 11:51:00 2024 +0800

    Optimize convertToNumber method (#14159)
---
 .../src/main/java/org/apache/dubbo/rpc/support/RpcUtils.java            | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 53cd36894d..228392fe02 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 class RpcUtils {
                 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) {