Skip to content

Commit

Permalink
Preserve original resource order
Browse files Browse the repository at this point in the history
  • Loading branch information
marcphilipp committed Mar 22, 2020
1 parent f0f2fd5 commit 10ff918
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import java.net.URL;
import java.net.URLConnection;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Optional;
import java.util.Properties;
Expand Down Expand Up @@ -53,7 +53,7 @@ private static Properties fromClasspathResource(String configFileName) {

try {
ClassLoader classLoader = ClassLoaderUtils.getDefaultClassLoader();
Set<URL> resources = new HashSet<>(Collections.list(classLoader.getResources(configFileName)));
Set<URL> resources = new LinkedHashSet<>(Collections.list(classLoader.getResources(configFileName)));

if (!resources.isEmpty()) {
if (resources.size() > 1) {
Expand Down

0 comments on commit 10ff918

Please sign in to comment.