diff --git a/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/BootstrapPropertySource.java b/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/BootstrapPropertySource.java index a78c0f442..b6f78ac91 100644 --- a/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/BootstrapPropertySource.java +++ b/spring-cloud-context/src/main/java/org/springframework/cloud/bootstrap/config/BootstrapPropertySource.java @@ -16,13 +16,8 @@ package org.springframework.cloud.bootstrap.config; -import java.util.Arrays; -import java.util.LinkedHashSet; -import java.util.Set; - import org.springframework.core.env.EnumerablePropertySource; import org.springframework.core.env.PropertySource; -import org.springframework.util.StringUtils; import static org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.BOOTSTRAP_PROPERTY_SOURCE_NAME; @@ -30,6 +25,7 @@ * Enumerable wrapper for a property source. * * @author Ryan Baxter + * @author Nan Chiu */ public class BootstrapPropertySource extends EnumerablePropertySource { @@ -47,9 +43,7 @@ public Object getProperty(String name) { @Override public String[] getPropertyNames() { - Set names = new LinkedHashSet<>(Arrays.asList(this.delegate.getPropertyNames())); - - return StringUtils.toStringArray(names); + return this.delegate.getPropertyNames(); } public PropertySource getDelegate() {