[ 
https://issues.apache.org/jira/browse/SCB-662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16512425#comment-16512425
 ] 

ASF GitHub Bot commented on SCB-662:
------------------------------------

liubao68 commented on a change in pull request #767: [SCB-662]Using 
cse/servicecomb duplicate key will get list of values
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/767#discussion_r195408761
 
 

 ##########
 File path: 
foundations/foundation-config/src/main/java/org/apache/servicecomb/config/ConfigUtil.java
 ##########
 @@ -171,7 +171,14 @@ private static void 
duplicateServiceCombConfigToCse(AbstractConfiguration source
       }
 
       String cseKey = CONFIG_CSE_PREFIX + key.substring(key.indexOf(".") + 1);
-      source.addProperty(cseKey, source.getProperty(key));
+      if (!source.containsKey(cseKey)) {
+        source.addProperty(cseKey, source.getProperty(key));
 
 Review comment:
   source.setProperty will clear and add. Here we checked existence and logged 
a warning message. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Using cse/servicecomb duplicate key will get list of values
> -----------------------------------------------------------
>
>                 Key: SCB-662
>                 URL: https://issues.apache.org/jira/browse/SCB-662
>             Project: Apache ServiceComb
>          Issue Type: Bug
>            Reporter: liubao
>            Priority: Major
>
> config file 1:
> cse.test.value=a
>  
> config file 2:
> servicecomb.test.value=b
>  
> when get value, will get a,b not a nor b. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to