From 87dc8ede2388a94239a0e46c4a4662457513fdec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=88=E9=93=AD?= Date: Wed, 21 Aug 2024 15:34:21 +0800 Subject: [PATCH] enhance setErrorMsg, use StringUtils.isBlank --- .../java/com/alipay/sofa/rpc/core/response/SofaResponse.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/api/src/main/java/com/alipay/sofa/rpc/core/response/SofaResponse.java b/core/api/src/main/java/com/alipay/sofa/rpc/core/response/SofaResponse.java index 9dbdd3a86..f757c7957 100644 --- a/core/api/src/main/java/com/alipay/sofa/rpc/core/response/SofaResponse.java +++ b/core/api/src/main/java/com/alipay/sofa/rpc/core/response/SofaResponse.java @@ -16,6 +16,7 @@ */ package com.alipay.sofa.rpc.core.response; +import com.alipay.sofa.rpc.common.utils.StringUtils; import com.alipay.sofa.rpc.transport.AbstractByteBuf; import java.io.Serializable; @@ -105,7 +106,7 @@ public String getErrorMsg() { * @param error the error */ public void setErrorMsg(String error) { - if (error == null) { + if (StringUtils.isBlank(error)) { return; } errorMsg = error;