|
6 | 6 | import java.nio.file.Files;
|
7 | 7 | import java.nio.file.Path;
|
8 | 8 | import java.nio.file.Paths;
|
| 9 | +import java.util.LinkedHashMap; |
9 | 10 | import java.util.Map;
|
10 |
| -import java.util.TreeMap; |
11 | 11 | import org.yaml.snakeyaml.DumperOptions;
|
12 | 12 | import org.yaml.snakeyaml.Yaml;
|
13 | 13 |
|
|
16 | 16 | * from/to files.
|
17 | 17 | */
|
18 | 18 | public class AppInfo {
|
19 |
| - private Map<String, Object> yaml = new TreeMap<>(); |
| 19 | + private Map<String, Object> yaml = new LinkedHashMap<>(); |
20 | 20 |
|
21 |
| - public Map<String, String> dependencies = new TreeMap<>(); |
22 |
| - public Map<String, String> repositories = new TreeMap<>(); |
23 |
| - public Map<String, String> actions = new TreeMap<>(); |
| 21 | + public Map<String, String> dependencies = new LinkedHashMap<>(); |
| 22 | + public Map<String, String> repositories = new LinkedHashMap<>(); |
| 23 | + public Map<String, String> actions = new LinkedHashMap<>(); |
24 | 24 |
|
25 | 25 | /** The official name of the app.yml file. */
|
26 | 26 | public static final String APP_INFO_FILE = "app.yml";
|
@@ -72,7 +72,7 @@ public static AppInfo read() throws IOException {
|
72 | 72 | }
|
73 | 73 | // Ensure yaml is never null
|
74 | 74 | if (appInfo.yaml == null) {
|
75 |
| - appInfo.yaml = new TreeMap<>(); |
| 75 | + appInfo.yaml = new LinkedHashMap<>(); |
76 | 76 | }
|
77 | 77 | // WARNING awful code ahead
|
78 | 78 | if (appInfo.yaml.containsKey("dependencies")
|
|
0 commit comments