Skip to content

Commit 6168fae

Browse files
izeyewilkinsona
authored andcommitted
Remove explicit type arguments
See spring-projectsgh-10494
1 parent a256602 commit 6168fae

File tree

61 files changed

+105
-108
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+105
-108
lines changed

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/server/ManagementServerFactoryCustomizer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public final void customize(T factory) {
6767
// the same place)
6868
webServerFactoryCustomizer.customize(factory);
6969
// Then reset the error pages
70-
factory.setErrorPages(Collections.<ErrorPage>emptySet());
70+
factory.setErrorPages(Collections.emptySet());
7171
// and add the management-specific bits
7272
customize(factory, managementServerProperties, serverProperties);
7373
}

Diff for: spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/web/servlet/RequestMappingEndpointTests.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import org.springframework.context.annotation.Scope;
3939
import org.springframework.context.annotation.ScopedProxyMode;
4040
import org.springframework.context.support.StaticApplicationContext;
41-
import org.springframework.web.servlet.handler.AbstractHandlerMethodMapping;
4241
import org.springframework.web.servlet.handler.AbstractUrlHandlerMapping;
4342
import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping;
4443

@@ -60,7 +59,7 @@ public void concreteUrlMappings() {
6059
mapping.setApplicationContext(new StaticApplicationContext());
6160
mapping.initApplicationContext();
6261
this.endpoint.setHandlerMappings(
63-
Collections.<AbstractUrlHandlerMapping>singletonList(mapping));
62+
Collections.singletonList(mapping));
6463
Map<String, Object> result = this.endpoint.mappings();
6564
assertThat(result).hasSize(1);
6665
@SuppressWarnings("unchecked")
@@ -121,7 +120,7 @@ public void beanMethodMappings() {
121120
public void concreteMethodMappings() {
122121
WebMvcEndpointHandlerMapping mapping = createHandlerMapping();
123122
this.endpoint.setMethodMappings(
124-
Collections.<AbstractHandlerMethodMapping<?>>singletonList(mapping));
123+
Collections.singletonList(mapping));
125124
Map<String, Object> result = this.endpoint.mappings();
126125
assertThat(result).hasSize(2);
127126
assertThat(result.keySet())

Diff for: spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/context/ShutdownEndpoint.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@
3939
public class ShutdownEndpoint implements ApplicationContextAware {
4040

4141
private static final Map<String, String> NO_CONTEXT_MESSAGE = Collections
42-
.unmodifiableMap(Collections.<String, String>singletonMap("message",
42+
.unmodifiableMap(Collections.singletonMap("message",
4343
"No context to shutdown."));
4444

4545
private static final Map<String, String> SHUTDOWN_MESSAGE = Collections
46-
.unmodifiableMap(Collections.<String, String>singletonMap("message",
46+
.unmodifiableMap(Collections.singletonMap("message",
4747
"Shutting down, bye..."));
4848

4949
private ConfigurableApplicationContext context;

Diff for: spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/context/properties/ConfigurationPropertiesReportEndpoint.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ private Map<String, Object> safeSerialize(ObjectMapper mapper, Object bean,
154154
return result;
155155
}
156156
catch (Exception ex) {
157-
return new HashMap<>(Collections.<String, Object>singletonMap("error",
157+
return new HashMap<>(Collections.singletonMap("error",
158158
"Cannot serialize '" + prefix + "'"));
159159
}
160160
}

Diff for: spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/audit/AuditEventsEndpointWebIntegrationTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public AuditEventsWebEndpointExtension auditEventsWebEndpointExtension(
106106

107107
private AuditEvent createEvent(String instant, String principal, String type) {
108108
return new AuditEvent(Date.from(Instant.parse(instant)), principal, type,
109-
Collections.<String, Object>emptyMap());
109+
Collections.emptyMap());
110110
}
111111

112112
}

Diff for: spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/audit/listener/AuditListenerTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class AuditListenerTests {
3737
public void testStoredEvents() {
3838
AuditEventRepository repository = mock(AuditEventRepository.class);
3939
AuditEvent event = new AuditEvent("principal", "type",
40-
Collections.<String, Object>emptyMap());
40+
Collections.emptyMap());
4141
AuditListener listener = new AuditListener(repository);
4242
listener.onApplicationEvent(new AuditApplicationEvent(event));
4343
verify(repository).add(event);

Diff for: spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/security/AuthorizationAuditListenerTests.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
import org.springframework.boot.actuate.audit.listener.AuditApplicationEvent;
2626
import org.springframework.context.ApplicationEventPublisher;
2727
import org.springframework.security.access.AccessDeniedException;
28-
import org.springframework.security.access.ConfigAttribute;
2928
import org.springframework.security.access.SecurityConfig;
3029
import org.springframework.security.access.event.AbstractAuthorizationEvent;
3130
import org.springframework.security.access.event.AuthenticationCredentialsNotFoundEvent;
@@ -56,7 +55,7 @@ public void init() {
5655
public void testAuthenticationCredentialsNotFound() {
5756
AuditApplicationEvent event = handleAuthorizationEvent(
5857
new AuthenticationCredentialsNotFoundEvent(this,
59-
Collections.<ConfigAttribute>singletonList(
58+
Collections.singletonList(
6059
new SecurityConfig("USER")),
6160
new AuthenticationCredentialsNotFoundException("Bad user")));
6261
assertThat(event.getAuditEvent().getType())
@@ -67,7 +66,7 @@ public void testAuthenticationCredentialsNotFound() {
6766
public void testAuthorizationFailure() {
6867
AuditApplicationEvent event = handleAuthorizationEvent(
6968
new AuthorizationFailureEvent(this,
70-
Collections.<ConfigAttribute>singletonList(
69+
Collections.singletonList(
7170
new SecurityConfig("USER")),
7271
new UsernamePasswordAuthenticationToken("user", "password"),
7372
new AccessDeniedException("Bad user")));
@@ -83,7 +82,7 @@ public void testDetailsAreIncludedInAuditEvent() throws Exception {
8382
authentication.setDetails(details);
8483
AuditApplicationEvent event = handleAuthorizationEvent(
8584
new AuthorizationFailureEvent(this,
86-
Collections.<ConfigAttribute>singletonList(
85+
Collections.singletonList(
8786
new SecurityConfig("USER")),
8887
authentication, new AccessDeniedException("Bad user")));
8988
assertThat(event.getAuditEvent().getType())

Diff for: spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/trace/InMemoryTraceRepositoryTests.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ public class InMemoryTraceRepositoryTests {
3535
@Test
3636
public void capacityLimited() {
3737
this.repository.setCapacity(2);
38-
this.repository.add(Collections.<String, Object>singletonMap("foo", "bar"));
39-
this.repository.add(Collections.<String, Object>singletonMap("bar", "foo"));
40-
this.repository.add(Collections.<String, Object>singletonMap("bar", "bar"));
38+
this.repository.add(Collections.singletonMap("foo", "bar"));
39+
this.repository.add(Collections.singletonMap("bar", "foo"));
40+
this.repository.add(Collections.singletonMap("bar", "bar"));
4141
List<Trace> traces = this.repository.findAll();
4242
assertThat(traces).hasSize(2);
4343
assertThat(traces.get(0).getInfo().get("bar")).isEqualTo("bar");
@@ -48,9 +48,9 @@ public void capacityLimited() {
4848
public void reverseFalse() {
4949
this.repository.setReverse(false);
5050
this.repository.setCapacity(2);
51-
this.repository.add(Collections.<String, Object>singletonMap("foo", "bar"));
52-
this.repository.add(Collections.<String, Object>singletonMap("bar", "foo"));
53-
this.repository.add(Collections.<String, Object>singletonMap("bar", "bar"));
51+
this.repository.add(Collections.singletonMap("foo", "bar"));
52+
this.repository.add(Collections.singletonMap("bar", "foo"));
53+
this.repository.add(Collections.singletonMap("bar", "bar"));
5454
List<Trace> traces = this.repository.findAll();
5555
assertThat(traces).hasSize(2);
5656
assertThat(traces.get(1).getInfo().get("bar")).isEqualTo("bar");

Diff for: spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/trace/TraceEndpointTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public class TraceEndpointTests {
3333
@Test
3434
public void trace() throws Exception {
3535
TraceRepository repository = new InMemoryTraceRepository();
36-
repository.add(Collections.<String, Object>singletonMap("a", "b"));
36+
repository.add(Collections.singletonMap("a", "b"));
3737
Trace trace = new TraceEndpoint(repository).traces().getTraces().get(0);
3838
assertThat(trace.getInfo().get("a")).isEqualTo("b");
3939
}

Diff for: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationPackages.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public void registerBeanDefinitions(AnnotationMetadata metadata,
131131

132132
@Override
133133
public Set<Object> determineImports(AnnotationMetadata metadata) {
134-
return Collections.<Object>singleton(new PackageImport(metadata));
134+
return Collections.singleton(new PackageImport(metadata));
135135
}
136136

137137
}

Diff for: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationSorter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -174,15 +174,15 @@ private int getOrder() {
174174
private Set<String> readBefore() {
175175
if (wasProcessed()) {
176176
return this.autoConfigurationMetadata.getSet(this.className,
177-
"AutoConfigureBefore", Collections.<String>emptySet());
177+
"AutoConfigureBefore", Collections.emptySet());
178178
}
179179
return getAnnotationValue(AutoConfigureBefore.class);
180180
}
181181

182182
private Set<String> readAfter() {
183183
if (wasProcessed()) {
184184
return this.autoConfigurationMetadata.getSet(this.className,
185-
"AutoConfigureAfter", Collections.<String>emptySet());
185+
"AutoConfigureAfter", Collections.emptySet());
186186
}
187187
return getAnnotationValue(AutoConfigureAfter.class);
188188
}

Diff for: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ImportAutoConfigurationImportSelector.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public Set<Object> determineImports(AnnotationMetadata metadata) {
6161
Set<String> result = new LinkedHashSet<>();
6262
result.addAll(getCandidateConfigurations(metadata, null));
6363
result.removeAll(getExclusions(metadata, null));
64-
return Collections.<Object>unmodifiableSet(result);
64+
return Collections.unmodifiableSet(result);
6565
}
6666

6767
@Override

Diff for: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/CacheManagerCustomizers.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public class CacheManagerCustomizers {
4242
public CacheManagerCustomizers(
4343
List<? extends CacheManagerCustomizer<?>> customizers) {
4444
this.customizers = (customizers != null ? new ArrayList<>(customizers)
45-
: Collections.<CacheManagerCustomizer<?>>emptyList());
45+
: Collections.emptyList());
4646
}
4747

4848
/**

Diff for: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/domain/EntityScanner.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public final Set<Class<?>> scan(Class<? extends Annotation>... annotationTypes)
6262
throws ClassNotFoundException {
6363
List<String> packages = getPackages();
6464
if (packages.isEmpty()) {
65-
return Collections.<Class<?>>emptySet();
65+
return Collections.emptySet();
6666
}
6767
Set<Class<?>> entitySet = new HashSet<>();
6868
ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(

Diff for: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/http/HttpMessageConverters.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public HttpMessageConverters(boolean addDefaultConverters,
104104
Collection<HttpMessageConverter<?>> converters) {
105105
List<HttpMessageConverter<?>> combined = getCombinedConverters(converters,
106106
addDefaultConverters ? getDefaultConverters()
107-
: Collections.<HttpMessageConverter<?>>emptyList());
107+
: Collections.emptyList());
108108
combined = postProcessConverters(combined);
109109
this.converters = Collections.unmodifiableList(combined);
110110
}

Diff for: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/http/HttpMessageConvertersAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public HttpMessageConvertersAutoConfiguration(
6969
@ConditionalOnMissingBean
7070
public HttpMessageConverters messageConverters() {
7171
return new HttpMessageConverters(this.converters == null
72-
? Collections.<HttpMessageConverter<?>>emptyList() : this.converters);
72+
? Collections.emptyList() : this.converters);
7373
}
7474

7575
@Configuration

Diff for: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQConnectionFactoryFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class ActiveMQConnectionFactoryFactory {
4949
Assert.notNull(properties, "Properties must not be null");
5050
this.properties = properties;
5151
this.factoryCustomizers = (factoryCustomizers != null ? factoryCustomizers
52-
: Collections.<ActiveMQConnectionFactoryCustomizer>emptyList());
52+
: Collections.emptyList());
5353
}
5454

5555
public <T extends ActiveMQConnectionFactory> T createConnectionFactory(

Diff for: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/ldap/LdapAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public ContextSource ldapContextSource() {
5757
source.setBase(this.properties.getBase());
5858
source.setUrls(this.properties.determineUrls(this.environment));
5959
source.setBaseEnvironmentProperties(Collections
60-
.<String, Object>unmodifiableMap(this.properties.getBaseEnvironment()));
60+
.unmodifiableMap(this.properties.getBaseEnvironment()));
6161
return source;
6262
}
6363

Diff for: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ private ToStringFriendlyFeatureAwareVersion(String version,
258258
Set<Feature> features) {
259259
Assert.notNull(version, "version must not be null");
260260
this.version = version;
261-
this.features = (features == null ? Collections.<Feature>emptySet()
261+
this.features = (features == null ? Collections.emptySet()
262262
: features);
263263
}
264264

Diff for: spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/servlet/error/BasicErrorController.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public class BasicErrorController extends AbstractErrorController {
6363
public BasicErrorController(ErrorAttributes errorAttributes,
6464
ErrorProperties errorProperties) {
6565
this(errorAttributes, errorProperties,
66-
Collections.<ErrorViewResolver>emptyList());
66+
Collections.emptyList());
6767
}
6868

6969
/**

Diff for: spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/AutoConfigurationImportSelectorTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ protected List<AutoConfigurationImportFilter> getAutoConfigurationImportFilters(
248248

249249
@Override
250250
protected List<AutoConfigurationImportListener> getAutoConfigurationImportListeners() {
251-
return Collections.<AutoConfigurationImportListener>singletonList(
251+
return Collections.singletonList(
252252
(event) -> this.lastEvent = event);
253253
}
254254

Diff for: spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/cache/CacheAutoConfigurationTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -936,7 +936,7 @@ static class JCacheCustomCacheManager {
936936
public javax.cache.CacheManager customJCacheCacheManager() {
937937
javax.cache.CacheManager cacheManager = mock(javax.cache.CacheManager.class);
938938
given(cacheManager.getCacheNames())
939-
.willReturn(Collections.<String>emptyList());
939+
.willReturn(Collections.emptyList());
940940
return cacheManager;
941941
}
942942

Diff for: spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/OnClassConditionAutoConfigurationImportFilterTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,10 @@ private AutoConfigurationMetadata getAutoConfigurationMetadata() {
7676
AutoConfigurationMetadata metadata = mock(AutoConfigurationMetadata.class);
7777
given(metadata.wasProcessed("test.match")).willReturn(true);
7878
given(metadata.getSet("test.match", "ConditionalOnClass"))
79-
.willReturn(Collections.<String>singleton("java.io.InputStream"));
79+
.willReturn(Collections.singleton("java.io.InputStream"));
8080
given(metadata.wasProcessed("test.nomatch")).willReturn(true);
8181
given(metadata.getSet("test.nomatch", "ConditionalOnClass"))
82-
.willReturn(Collections.<String>singleton("java.io.DoesNotExist"));
82+
.willReturn(Collections.singleton("java.io.DoesNotExist"));
8383
return metadata;
8484
}
8585

Diff for: spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/domain/EntityScanPackagesTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public void registerFromCollectionWhenRegistryIsNullShouldThrowException()
9292
throws Exception {
9393
this.thrown.expect(IllegalArgumentException.class);
9494
this.thrown.expectMessage("Registry must not be null");
95-
EntityScanPackages.register(null, Collections.<String>emptyList());
95+
EntityScanPackages.register(null, Collections.emptyList());
9696
}
9797

9898
@Test

Diff for: spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/hazelcast/HazelcastJpaDependencyAutoConfigurationTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ private List<String> entityManagerFactoryDependencies(
103103
.getSourceApplicationContext()).getBeanDefinition("entityManagerFactory")
104104
.getDependsOn();
105105
return dependsOn != null ? Arrays.asList(dependsOn)
106-
: Collections.<String>emptyList();
106+
: Collections.emptyList();
107107
}
108108

109109
@Configuration

Diff for: spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jms/activemq/ActiveMQPropertiesTests.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public void setTrustedPackages() {
8888
private ActiveMQConnectionFactoryFactory createFactory(
8989
ActiveMQProperties properties) {
9090
return new ActiveMQConnectionFactoryFactory(properties,
91-
Collections.<ActiveMQConnectionFactoryCustomizer>emptyList());
91+
Collections.emptyList());
9292
}
9393

9494
}

Diff for: spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jndi/JndiPropertiesHidingClassLoader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public JndiPropertiesHidingClassLoader(ClassLoader parent) {
3636
@Override
3737
public Enumeration<URL> getResources(String name) throws IOException {
3838
if ("jndi.properties".equals(name)) {
39-
return Collections.enumeration(Collections.<URL>emptyList());
39+
return Collections.enumeration(Collections.emptyList());
4040
}
4141
return super.getResources(name);
4242
}

Diff for: spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mobile/DeviceDelegatingViewResolverAutoConfigurationTests.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public void deviceDelegatingJspResourceViewResolver() throws Exception {
8989

9090
@Test
9191
public void deviceDelegatingFreeMarkerViewResolver() throws Exception {
92-
load(Collections.<Class<?>>singletonList(FreeMarkerAutoConfiguration.class),
92+
load(Collections.singletonList(FreeMarkerAutoConfiguration.class),
9393
"spring.mobile.devicedelegatingviewresolver.enabled:true");
9494
assertThat(this.context.getBeansOfType(LiteDeviceDelegatingViewResolver.class))
9595
.hasSize(2);
@@ -100,7 +100,7 @@ public void deviceDelegatingFreeMarkerViewResolver() throws Exception {
100100

101101
@Test
102102
public void deviceDelegatingGroovyMarkupViewResolver() throws Exception {
103-
load(Collections.<Class<?>>singletonList(GroovyTemplateAutoConfiguration.class),
103+
load(Collections.singletonList(GroovyTemplateAutoConfiguration.class),
104104
"spring.mobile.devicedelegatingviewresolver.enabled:true");
105105
assertThat(this.context.getBeansOfType(LiteDeviceDelegatingViewResolver.class))
106106
.hasSize(2);
@@ -111,7 +111,7 @@ public void deviceDelegatingGroovyMarkupViewResolver() throws Exception {
111111

112112
@Test
113113
public void deviceDelegatingMustacheViewResolver() throws Exception {
114-
load(Collections.<Class<?>>singletonList(MustacheAutoConfiguration.class),
114+
load(Collections.singletonList(MustacheAutoConfiguration.class),
115115
"spring.mobile.devicedelegatingviewresolver.enabled:true");
116116
assertThat(this.context.getBeansOfType(LiteDeviceDelegatingViewResolver.class))
117117
.hasSize(2);
@@ -122,7 +122,7 @@ public void deviceDelegatingMustacheViewResolver() throws Exception {
122122

123123
@Test
124124
public void deviceDelegatingThymeleafViewResolver() throws Exception {
125-
load(Collections.<Class<?>>singletonList(ThymeleafAutoConfiguration.class),
125+
load(Collections.singletonList(ThymeleafAutoConfiguration.class),
126126
"spring.mobile.devicedelegatingviewresolver.enabled:true");
127127
assertThat(this.context.getBeansOfType(LiteDeviceDelegatingViewResolver.class))
128128
.hasSize(2);

Diff for: spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/DefaultCommandFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
*/
3939
public class DefaultCommandFactory implements CommandFactory {
4040

41-
private static final List<Command> defaultCommands = Arrays.<Command>asList(
41+
private static final List<Command> defaultCommands = Arrays.asList(
4242
new VersionCommand(), new RunCommand(), new GrabCommand(), new JarCommand(),
4343
new WarCommand(), new InstallCommand(), new UninstallCommand(),
4444
new InitCommand());

Diff for: spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/dependencies/Dependency.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public final class Dependency {
4444
* @param version the version
4545
*/
4646
public Dependency(String groupId, String artifactId, String version) {
47-
this(groupId, artifactId, version, Collections.<Exclusion>emptyList());
47+
this(groupId, artifactId, version, Collections.emptyList());
4848
}
4949

5050
/**

Diff for: spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/groovy/GroovyTemplate.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public abstract class GroovyTemplate {
3838

3939
public static String template(String name)
4040
throws IOException, CompilationFailedException, ClassNotFoundException {
41-
return template(name, Collections.<String, Object>emptyMap());
41+
return template(name, Collections.emptyMap());
4242
}
4343

4444
public static String template(String name, Map<String, ?> model)

Diff for: spring-boot-project/spring-boot-cli/src/test/java/cli/command/CustomCommandFactory.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class CustomCommandFactory implements CommandFactory {
2929

3030
@Override
3131
public Collection<Command> getCommands() {
32-
return Collections.<Command>singleton(new CustomCommand());
32+
return Collections.singleton(new CustomCommand());
3333
}
3434

3535
}

0 commit comments

Comments
 (0)