Skip to content

Commit 4d366f8

Browse files
style: Remove whitespaces
1 parent 9c559d4 commit 4d366f8

File tree

2 files changed

+30
-31
lines changed

2 files changed

+30
-31
lines changed

spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/autoconfigure/LocalDevToolsAutoConfiguration.java

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -95,15 +95,14 @@ LiveReloadServerEventListener liveReloadServerEventListener(OptionalLiveReloadSe
9595
LiveReloadForAdditionalPaths liveReloadForAdditionalPaths(LiveReloadServer liveReloadServer,
9696
DevToolsProperties properties, FileSystemWatcher fileSystemWatcher) {
9797
return new LiveReloadForAdditionalPaths(liveReloadServer,
98-
properties.getLivereload().getAdditionalPaths(),fileSystemWatcher);
98+
properties.getLivereload().getAdditionalPaths(),fileSystemWatcher);
9999
}
100100

101101
@Bean
102-
FileSystemWatcher fileSystemWatcher(DevToolsProperties properties) {
103-
return new FileSystemWatcher(true,
104-
properties.getLivereload().getPollInterval(),
105-
properties.getLivereload().getQuietPeriod()
106-
);
102+
FileSystemWatcher fileSystemWatcher(DevToolsProperties properties) {
103+
return new FileSystemWatcher(true,
104+
properties.getLivereload().getPollInterval(),
105+
properties.getLivereload().getQuietPeriod());
107106
}
108107

109108
}
@@ -233,27 +232,27 @@ public void onApplicationEvent(ClassPathChangedEvent event) {
233232

234233
}
235234

236-
static class LiveReloadForAdditionalPaths implements DisposableBean {
235+
static class LiveReloadForAdditionalPaths implements DisposableBean {
237236

238237
private final FileSystemWatcher fileSystemWatcher;
239238

240239
@Override
241-
public void destroy() throws Exception {
242-
if(this.fileSystemWatcher!=null)
243-
this.fileSystemWatcher.stop();
244-
}
240+
public void destroy() throws Exception {
241+
if(this.fileSystemWatcher!=null)
242+
this.fileSystemWatcher.stop();
243+
}
245244

246-
public LiveReloadForAdditionalPaths( LiveReloadServer liveReloadServer, List<File> staticLocations, FileSystemWatcher fileSystemWatcher) {
247-
this.fileSystemWatcher = fileSystemWatcher;
245+
public LiveReloadForAdditionalPaths( LiveReloadServer liveReloadServer, List<File> staticLocations, FileSystemWatcher fileSystemWatcher) {
246+
this.fileSystemWatcher = fileSystemWatcher;
248247

249-
for (File path : staticLocations) {
250-
this.fileSystemWatcher.addSourceDirectory(path.getAbsoluteFile());
251-
}
248+
for (File path : staticLocations) {
249+
this.fileSystemWatcher.addSourceDirectory(path.getAbsoluteFile());
250+
}
252251

253-
this.fileSystemWatcher.addListener(__ -> liveReloadServer.triggerReload());
252+
this.fileSystemWatcher.addListener(__ -> liveReloadServer.triggerReload());
254253

255-
this.fileSystemWatcher.start();
256-
}
254+
this.fileSystemWatcher.start();
255+
}
257256
}
258257

259258
}

spring-boot-project/spring-boot-devtools/src/test/java/org/springframework/boot/devtools/autoconfigure/LocalDevToolsAutoConfigurationTests.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -216,18 +216,18 @@ void watchingAdditionalPaths() throws Exception {
216216
}
217217

218218
@Test
219-
void watchingAdditionalPathsForReload() throws Exception {
220-
Map<String, Object> properties = new HashMap<>();
221-
properties.put("spring.devtools.livereload.additional-paths", "src/main/java,src/test/java");
222-
this.context = getContext(() -> initializeAndRun(Config.class, properties));
223-
LiveReloadForAdditionalPaths liveReloadForAdditionalPaths = this.context.getBean(LiveReloadForAdditionalPaths.class);
224-
Object watcher = ReflectionTestUtils.getField(liveReloadForAdditionalPaths, "fileSystemWatcher");
225-
@SuppressWarnings("unchecked")
226-
Map<File, Object> directories = (Map<File, Object>) ReflectionTestUtils.getField(watcher, "directories");
227-
assertThat(directories).hasSize(2)
228-
.containsKey(new File("src/main/java").getAbsoluteFile())
229-
.containsKey(new File("src/test/java").getAbsoluteFile());
230-
}
219+
void watchingAdditionalPathsForReload() throws Exception {
220+
Map<String, Object> properties = new HashMap<>();
221+
properties.put("spring.devtools.livereload.additional-paths", "src/main/java,src/test/java");
222+
this.context = getContext(() -> initializeAndRun(Config.class, properties));
223+
LiveReloadForAdditionalPaths liveReloadForAdditionalPaths = this.context.getBean(LiveReloadForAdditionalPaths.class);
224+
Object watcher = ReflectionTestUtils.getField(liveReloadForAdditionalPaths, "fileSystemWatcher");
225+
@SuppressWarnings("unchecked")
226+
Map<File, Object> directories = (Map<File, Object>) ReflectionTestUtils.getField(watcher, "directories");
227+
assertThat(directories).hasSize(2)
228+
.containsKey(new File("src/main/java").getAbsoluteFile())
229+
.containsKey(new File("src/test/java").getAbsoluteFile());
230+
}
231231

232232
@Test
233233
void devToolsSwitchesJspServletToDevelopmentMode() throws Exception {

0 commit comments

Comments
 (0)