Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,16 @@

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;

/**
* Enumerable wrapper for a property source.
*
* @author Ryan Baxter
* @author Nan Chiu
*/
public class BootstrapPropertySource<T> extends EnumerablePropertySource<T> {

Expand All @@ -47,9 +43,7 @@ public Object getProperty(String name) {

@Override
public String[] getPropertyNames() {
Set<String> names = new LinkedHashSet<>(Arrays.asList(this.delegate.getPropertyNames()));

return StringUtils.toStringArray(names);
return this.delegate.getPropertyNames();
}

public PropertySource<T> getDelegate() {
Expand Down
Loading