Simplify some code

See gh-17852
This commit is contained in:
lijuny 2019-08-13 18:51:19 +08:00 committed by Stephane Nicoll
parent 21f1b3a79d
commit b26f887a2e
2 changed files with 2 additions and 4 deletions

View File

@ -252,8 +252,7 @@ class LocalDevToolsAutoConfigurationTests {
Restarter.initialize(new String[0], false, new MockRestartInitializer(), false);
SpringApplication application = new SpringApplication(config);
application.setDefaultProperties(getDefaultProperties(properties));
ConfigurableApplicationContext context = application.run(args);
return context;
return application.run(args);
}
private Map<String, Object> getDefaultProperties(Map<String, Object> specifiedProperties) {

View File

@ -139,8 +139,7 @@ class ClassPathChangeUploaderTests {
files.add(new ChangedFile(sourceFolder, file3, Type.DELETE));
Set<ChangedFiles> changeSet = new LinkedHashSet<>();
changeSet.add(new ChangedFiles(sourceFolder, files));
ClassPathChangedEvent event = new ClassPathChangedEvent(this, changeSet, false);
return event;
return new ClassPathChangedEvent(this, changeSet, false);
}
private File createFile(File sourceFolder, String name) throws IOException {