Skip to content

Commit 7978c3d

Browse files
committed
Polish
1 parent 48960c5 commit 7978c3d

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/env/DevToolsHomePropertiesPostProcessorTests.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,12 @@ void loadFromConfigFolderWithPropertiesTakingPrecedence() throws Exception {
9999
Properties properties = new Properties();
100100
properties.put("abc", "def");
101101
properties.put("bar", "baz");
102-
OutputStream out = new FileOutputStream(
103-
new File(this.home + "/.config/spring-boot/", "spring-boot-devtools.yaml"));
102+
OutputStream out = new FileOutputStream(new File(this.configDir, "spring-boot-devtools.yaml"));
104103
properties.store(out, null);
105104
out.close();
106105
Properties properties2 = new Properties();
107106
properties2.put("abc", "jkl");
108-
OutputStream out2 = new FileOutputStream(
109-
new File(this.home + "/.config/spring-boot/", "spring-boot-devtools.properties"));
107+
OutputStream out2 = new FileOutputStream(new File(this.configDir, "spring-boot-devtools.properties"));
110108
properties2.store(out2, null);
111109
out2.close();
112110
ConfigurableEnvironment environment = getPostProcessedEnvironment();
@@ -122,8 +120,7 @@ void loadFromConfigFolderTakesPrecedenceOverHomeFolder() throws Exception {
122120
writeFile(properties, ".spring-boot-devtools.properties");
123121
Properties properties2 = new Properties();
124122
properties2.put("abc", "jkl");
125-
OutputStream out2 = new FileOutputStream(
126-
new File(this.home + "/.config/spring-boot/", "spring-boot-devtools.properties"));
123+
OutputStream out2 = new FileOutputStream(new File(this.configDir, "spring-boot-devtools.properties"));
127124
properties2.store(out2, null);
128125
out2.close();
129126
ConfigurableEnvironment environment = getPostProcessedEnvironment();
@@ -139,8 +136,7 @@ void loadFromConfigFolderWithYamlTakesPrecedenceOverHomeFolder() throws Exceptio
139136
writeFile(properties, ".spring-boot-devtools.properties");
140137
Properties properties2 = new Properties();
141138
properties2.put("abc", "jkl");
142-
OutputStream out2 = new FileOutputStream(
143-
new File(this.home + "/.config/spring-boot/", "spring-boot-devtools.yml"));
139+
OutputStream out2 = new FileOutputStream(new File(this.configDir, "spring-boot-devtools.yml"));
144140
properties2.store(out2, null);
145141
out2.close();
146142
ConfigurableEnvironment environment = getPostProcessedEnvironment();

0 commit comments

Comments
 (0)