You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2022/06/01 06:48:34 UTC

[servicecomb-java-chassis] branch master updated: [SCB-2539] fix the fileSource configuration item does not support com… (#3017)

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

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/servicecomb-java-chassis.git


The following commit(s) were added to refs/heads/master by this push:
     new 609e93fc0 [SCB-2539] fix the fileSource configuration item does not support com… (#3017)
609e93fc0 is described below

commit 609e93fc09734c62e2b85cabb22cf2825777f89a
Author: david6969xin <86...@users.noreply.github.com>
AuthorDate: Wed Jun 1 14:48:29 2022 +0800

    [SCB-2539] fix the fileSource configuration item does not support com… (#3017)
---
 .../main/java/org/apache/servicecomb/config/ConfigCenterConfig.java  | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/ConfigCenterConfig.java b/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/ConfigCenterConfig.java
index 5a4030b47..6dd292e93 100644
--- a/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/ConfigCenterConfig.java
+++ b/dynamic-config/config-cc/src/main/java/org/apache/servicecomb/config/ConfigCenterConfig.java
@@ -18,6 +18,7 @@
 package org.apache.servicecomb.config;
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
 
@@ -74,9 +75,7 @@ public final class ConfigCenterConfig {
   public List<String> getFileSources() {
     Object property = finalConfig.getProperty(FILE_SOURCE);
     if (property instanceof String) {
-      List<String> result = new ArrayList<>();
-      result.add((String) property);
-      return result;
+      return new ArrayList<>(Arrays.asList(((String) property).split(",")));
     }
     if (property instanceof List) {
       return (List<String>) property;