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/07/04 01:37:12 UTC
[dubbo] branch 3.0 updated: fix UnsupportedOperationException in invokeSetParameters (#10262)
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 90cef365ba fix UnsupportedOperationException in invokeSetParameters (#10262)
90cef365ba is described below
commit 90cef365ba9a0beeb6ceb1f9ae0ddbf004add8bb
Author: cheese8 <yi...@163.com>
AuthorDate: Mon Jul 4 09:37:06 2022 +0800
fix UnsupportedOperationException in invokeSetParameters (#10262)
* fix UnsupportedOperationException 10257
* Update AbstractConfig.java
* Update AbstractConfig.java
---
.../src/main/java/org/apache/dubbo/config/AbstractConfig.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java b/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java
index 5d4ee5f1b4..d37f3e919f 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractConfig.java
@@ -823,8 +823,11 @@ public abstract class AbstractConfig implements Serializable {
if (CollectionUtils.isEmptyMap(values)) {
return;
}
- Map<String, String> map = invokeGetParameters(obj.getClass(), obj);
- map = map == null ? new HashMap<>() : map;
+ Map<String, String> map = new HashMap<>();
+ Map<String, String> getParametersMap = invokeGetParameters(obj.getClass(), obj);
+ if (getParametersMap != null && !getParametersMap.isEmpty()) {
+ map.putAll(getParametersMap);
+ }
map.putAll(values);
invokeSetParameters(obj.getClass(), obj, map);
}