You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by gu...@apache.org on 2022/04/18 06:25:54 UTC
[dubbo] branch 3.0 updated: improve performance (#9931)
This is an automated email from the ASF dual-hosted git repository.
guohao 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 95823fd4b1 improve performance (#9931)
95823fd4b1 is described below
commit 95823fd4b15f27df9fe039c9c640ada073bf40ad
Author: Oliver <wq...@163.com>
AuthorDate: Mon Apr 18 14:25:17 2022 +0800
improve performance (#9931)
---
.../boot/env/DubboDefaultPropertiesEnvironmentPostProcessor.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessor.java b/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessor.java
index 941c1ef3af..9c3ff97031 100644
--- a/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessor.java
+++ b/dubbo-spring-boot/dubbo-spring-boot-compatible/autoconfigure/src/main/java/org/apache/dubbo/spring/boot/env/DubboDefaultPropertiesEnvironmentPostProcessor.java
@@ -119,9 +119,10 @@ public class DubboDefaultPropertiesEnvironmentPostProcessor implements Environme
PropertySource<?> source = propertySources.get(PROPERTY_SOURCE_NAME);
if (source instanceof MapPropertySource) {
target = (MapPropertySource) source;
- for (String key : map.keySet()) {
+ for (Map.Entry<String,Object> entry : map.entrySet()) {
+ String key = entry.getKey();
if (!target.containsProperty(key)) {
- target.getSource().put(key, map.get(key));
+ target.getSource().put(key, entry.getValue());
}
}
}