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 2022/02/25 08:53:47 UTC

[dubbo] branch 3.0 updated: Fix the problem that NPE may appear in ReferenceBeanSupport#convertToString method (#9693)

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

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


The following commit(s) were added to refs/heads/3.0 by this push:
     new 08dea81  Fix the problem that NPE may appear in ReferenceBeanSupport#convertToString method (#9693)
08dea81 is described below

commit 08dea8118ba9cef853c49fc07184bac5cf19336c
Author: 灼华 <43...@users.noreply.github.com>
AuthorDate: Fri Feb 25 16:53:35 2022 +0800

    Fix the problem that NPE may appear in ReferenceBeanSupport#convertToString method (#9693)
---
 .../java/org/apache/dubbo/config/spring/util/DubboAnnotationUtils.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/DubboAnnotationUtils.java b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/DubboAnnotationUtils.java
index baed5e4..132990e 100644
--- a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/DubboAnnotationUtils.java
+++ b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/DubboAnnotationUtils.java
@@ -27,6 +27,7 @@ import org.springframework.util.Assert;
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
@@ -154,7 +155,7 @@ public class DubboAnnotationUtils {
      */
     public static Map<String, String> convertParameters(String[] parameters) {
         if (ArrayUtils.isEmpty(parameters)) {
-            return null;
+            return Collections.emptyMap();
         }
 
         List<String> compatibleParameterArray = Arrays.stream(parameters)