From 7b6de545e788fd8a25818e54a99879e86094e90a Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Thu, 8 Oct 2015 10:20:00 +0100 Subject: [PATCH] Change HashSet to LinkedHashSet to preserve order of file extensions Fixes gh-4111 --- .../org/springframework/boot/env/PropertySourcesLoader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot/src/main/java/org/springframework/boot/env/PropertySourcesLoader.java b/spring-boot/src/main/java/org/springframework/boot/env/PropertySourcesLoader.java index f3d51484e2..9ae250f427 100644 --- a/spring-boot/src/main/java/org/springframework/boot/env/PropertySourcesLoader.java +++ b/spring-boot/src/main/java/org/springframework/boot/env/PropertySourcesLoader.java @@ -18,7 +18,7 @@ package org.springframework.boot.env; import java.io.IOException; import java.util.Arrays; -import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -199,7 +199,7 @@ public class PropertySourcesLoader { * @return the file extensions */ public Set getAllFileExtensions() { - Set fileExtensions = new HashSet(); + Set fileExtensions = new LinkedHashSet(); for (PropertySourceLoader loader : this.loaders) { fileExtensions.addAll(Arrays.asList(loader.getFileExtensions())); }