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 897687f  Print warn log instead of throw exception. (#8142)
897687f is described below

commit 897687f1f7163e34501fab23871c18410dc15dd3
Author: ken.lj <[email protected]>
AuthorDate: Sat Jun 26 20:39:38 2021 +0800

    Print warn log instead of throw exception. (#8142)
---
 .../main/java/org/apache/dubbo/config/context/ConfigManager.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/dubbo-common/src/main/java/org/apache/dubbo/config/context/ConfigManager.java 
b/dubbo-common/src/main/java/org/apache/dubbo/config/context/ConfigManager.java
index 2ac5969..a4c3a9e 100644
--- 
a/dubbo-common/src/main/java/org/apache/dubbo/config/context/ConfigManager.java
+++ 
b/dubbo-common/src/main/java/org/apache/dubbo/config/context/ConfigManager.java
@@ -570,8 +570,10 @@ public class ConfigManager extends LifecycleAdapter 
implements FrameworkExt {
     private static void checkDuplicate(AbstractConfig oldOne, AbstractConfig 
newOne) throws IllegalStateException {
         if (!isEquals(oldOne, newOne)) {
             String configName = oldOne.getClass().getSimpleName();
-            throw new IllegalStateException("Duplicate Configs found for " + 
configName + ", only one unique " + configName +
-                    " is allowed for one application. old: "+oldOne+", new: 
"+newOne);
+            if (configWarnLogEnabled) {
+                logger.warn("Duplicate Configs found for " + configName + ", 
only one unique " + configName +
+                    " is allowed for one application. old: " + oldOne + ", 
new: " + newOne);
+            }
         }
     }
 

Reply via email to