You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2019/11/15 07:25:05 UTC

[dubbo] 02/03: change from throwing exception to logging warn message for duplicate configs

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

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

commit 3512e27669f051ae04c76ba3bb2893f439ee06c9
Author: ken.lj <ke...@gmail.com>
AuthorDate: Fri Nov 15 13:56:41 2019 +0800

    change from throwing exception to logging warn message for duplicate configs
---
 .../src/main/java/org/apache/dubbo/config/context/ConfigManager.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 b7efb4f..4175c2e 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
@@ -445,7 +445,7 @@ public class ConfigManager extends LifecycleAdapter implements FrameworkExt {
     private static void checkDuplicate(AbstractConfig oldOne, AbstractConfig newOne) throws IllegalStateException {
         if (oldOne != null && !oldOne.equals(newOne)) {
             String configName = oldOne.getClass().getSimpleName();
-            throw new IllegalStateException("Duplicate Config found for " + configName + ", you should use only one unique " + configName + " for one application.");
+            logger.warn("Duplicate Config found for " + configName + ", you should use only one unique " + configName + " for one application.");
         }
     }