Commit e8effad0 authored by Stephane Nicoll's avatar Stephane Nicoll

Merge pull request #17852 from succezlijunyi

* pr/17852:
  Simplify some code

Closes gh-17852
parents 21f1b3a7 b26f887a
...@@ -252,8 +252,7 @@ class LocalDevToolsAutoConfigurationTests { ...@@ -252,8 +252,7 @@ class LocalDevToolsAutoConfigurationTests {
Restarter.initialize(new String[0], false, new MockRestartInitializer(), false); Restarter.initialize(new String[0], false, new MockRestartInitializer(), false);
SpringApplication application = new SpringApplication(config); SpringApplication application = new SpringApplication(config);
application.setDefaultProperties(getDefaultProperties(properties)); application.setDefaultProperties(getDefaultProperties(properties));
ConfigurableApplicationContext context = application.run(args); return application.run(args);
return context;
} }
private Map<String, Object> getDefaultProperties(Map<String, Object> specifiedProperties) { private Map<String, Object> getDefaultProperties(Map<String, Object> specifiedProperties) {
......
...@@ -139,8 +139,7 @@ class ClassPathChangeUploaderTests { ...@@ -139,8 +139,7 @@ class ClassPathChangeUploaderTests {
files.add(new ChangedFile(sourceFolder, file3, Type.DELETE)); files.add(new ChangedFile(sourceFolder, file3, Type.DELETE));
Set<ChangedFiles> changeSet = new LinkedHashSet<>(); Set<ChangedFiles> changeSet = new LinkedHashSet<>();
changeSet.add(new ChangedFiles(sourceFolder, files)); changeSet.add(new ChangedFiles(sourceFolder, files));
ClassPathChangedEvent event = new ClassPathChangedEvent(this, changeSet, false); return new ClassPathChangedEvent(this, changeSet, false);
return event;
} }
private File createFile(File sourceFolder, String name) throws IOException { private File createFile(File sourceFolder, String name) throws IOException {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment