Remove explicit type arguments

See gh-10494
This commit is contained in:
Johnny Lim
2017-10-03 01:25:51 +09:00
committed by Andy Wilkinson
parent a256602c7b
commit 6168fae720
61 changed files with 105 additions and 108 deletions

View File

@@ -123,7 +123,7 @@ final class ChangeableUrls implements Iterable<URL> {
private static List<URL> getUrlsFromClassPathOfJarManifestIfPossible(URL url) {
JarFile jarFile = getJarFileIfPossible(url);
if (jarFile == null) {
return Collections.<URL>emptyList();
return Collections.emptyList();
}
try {
return getUrlsFromManifestClassPathAttribute(url, jarFile);
@@ -152,7 +152,7 @@ final class ChangeableUrls implements Iterable<URL> {
JarFile jarFile) throws IOException {
Manifest manifest = jarFile.getManifest();
if (manifest == null) {
return Collections.<URL>emptyList();
return Collections.emptyList();
}
String classPath = manifest.getMainAttributes()
.getValue(Attributes.Name.CLASS_PATH);

View File

@@ -37,7 +37,6 @@ import org.springframework.boot.autoconfigure.web.ResourceProperties;
import org.springframework.boot.autoconfigure.web.servlet.ServletWebServerFactoryAutoConfiguration;
import org.springframework.boot.devtools.classpath.ClassPathChangedEvent;
import org.springframework.boot.devtools.classpath.ClassPathFileSystemWatcher;
import org.springframework.boot.devtools.filewatch.ChangedFiles;
import org.springframework.boot.devtools.livereload.LiveReloadServer;
import org.springframework.boot.devtools.restart.FailureHandler;
import org.springframework.boot.devtools.restart.MockRestartInitializer;
@@ -146,7 +145,7 @@ public class LocalDevToolsAutoConfigurationTests {
LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
reset(server);
ClassPathChangedEvent event = new ClassPathChangedEvent(this.context,
Collections.<ChangedFiles>emptySet(), false);
Collections.emptySet(), false);
this.context.publishEvent(event);
verify(server).triggerReload();
}
@@ -157,7 +156,7 @@ public class LocalDevToolsAutoConfigurationTests {
LiveReloadServer server = this.context.getBean(LiveReloadServer.class);
reset(server);
ClassPathChangedEvent event = new ClassPathChangedEvent(this.context,
Collections.<ChangedFiles>emptySet(), true);
Collections.emptySet(), true);
this.context.publishEvent(event);
verify(server, never()).triggerReload();
}
@@ -175,7 +174,7 @@ public class LocalDevToolsAutoConfigurationTests {
public void restartTriggeredOnClassPathChangeWithRestart() throws Exception {
this.context = initializeAndRun(Config.class);
ClassPathChangedEvent event = new ClassPathChangedEvent(this.context,
Collections.<ChangedFiles>emptySet(), true);
Collections.emptySet(), true);
this.context.publishEvent(event);
verify(this.mockRestarter.getMock()).restart(any(FailureHandler.class));
}
@@ -184,7 +183,7 @@ public class LocalDevToolsAutoConfigurationTests {
public void restartNotTriggeredOnClassPathChangeWithRestart() throws Exception {
this.context = initializeAndRun(Config.class);
ClassPathChangedEvent event = new ClassPathChangedEvent(this.context,
Collections.<ChangedFiles>emptySet(), false);
Collections.emptySet(), false);
this.context.publishEvent(event);
verify(this.mockRestarter.getMock(), never()).restart();
}
@@ -251,7 +250,7 @@ public class LocalDevToolsAutoConfigurationTests {
private ConfigurableApplicationContext initializeAndRun(Class<?> config,
String... args) {
return initializeAndRun(config, Collections.<String, Object>emptyMap(), args);
return initializeAndRun(config, Collections.emptyMap(), args);
}
private ConfigurableApplicationContext initializeAndRun(Class<?> config,

View File

@@ -99,7 +99,7 @@ public class DevToolPropertiesIntegrationTests {
SpringApplication application = new SpringApplication(
BeanConditionConfiguration.class);
application.setWebApplicationType(WebApplicationType.NONE);
application.setDefaultProperties(Collections.<String, Object>singletonMap(
application.setDefaultProperties(Collections.singletonMap(
"spring.devtools.remote.secret", "donttell"));
this.context = application.run();
this.context.getBean(MyBean.class);

View File

@@ -79,7 +79,7 @@ public class DispatcherTests {
public void accessManagerMustNotBeNull() throws Exception {
this.thrown.expect(IllegalArgumentException.class);
this.thrown.expectMessage("AccessManager must not be null");
new Dispatcher(null, Collections.<HandlerMapper>emptyList());
new Dispatcher(null, Collections.emptyList());
}
@Test