JoeCqupt commented on code in PR #13781:
URL: https://github.com/apache/dubbo/pull/13781#discussion_r1500296974
##########
dubbo-common/src/main/java/org/apache/dubbo/common/config/ModuleEnvironment.java:
##########
@@ -93,9 +93,6 @@ public List<Map<String, String>>
getConfigurationMaps(AbstractConfig config, Str
@Override
public Configuration getDynamicGlobalConfiguration() {
- if (dynamicConfiguration == null) {
- return applicationDelegate.getDynamicGlobalConfiguration();
- }
Review Comment:
Please refer to the code following these two lines of code :
```
if (dynamicConfiguration == null) {
if (logger.isWarnEnabled()) {
logger.warn(
COMMON_UNEXPECTED_EXCEPTION,
"",
"",
"dynamicConfiguration is null , return
globalConfiguration.");
}
return getConfiguration();
}
```
if dynamicConfiguration is null, it will use the result of method
`getConfiguration()`
```
@Override
public CompositeConfiguration getConfiguration() {
if (globalConfiguration == null) {
CompositeConfiguration configuration = new
CompositeConfiguration();
configuration.addConfiguration(applicationDelegate.getConfiguration());
configuration.addConfiguration(orderedPropertiesConfiguration);
globalConfiguration = configuration;
}
return globalConfiguration;
}
```
method `getConfiguration` will return applicationModel's dynamic
configuration and **ordered properties configuration**
so that:
```
if (dynamicConfiguration == null) {
return applicationDelegate.getDynamicGlobalConfiguration();
}
```
those two lines of code is incorrect. it Ignored ModelEnvironment's
**ordered properties configuration**
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]