Remove explicit type arguments
See gh-10494
This commit is contained in:
committed by
Andy Wilkinson
parent
a256602c7b
commit
6168fae720
@@ -131,7 +131,7 @@ public abstract class AutoConfigurationPackages {
|
||||
|
||||
@Override
|
||||
public Set<Object> determineImports(AnnotationMetadata metadata) {
|
||||
return Collections.<Object>singleton(new PackageImport(metadata));
|
||||
return Collections.singleton(new PackageImport(metadata));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ class AutoConfigurationSorter {
|
||||
private Set<String> readBefore() {
|
||||
if (wasProcessed()) {
|
||||
return this.autoConfigurationMetadata.getSet(this.className,
|
||||
"AutoConfigureBefore", Collections.<String>emptySet());
|
||||
"AutoConfigureBefore", Collections.emptySet());
|
||||
}
|
||||
return getAnnotationValue(AutoConfigureBefore.class);
|
||||
}
|
||||
@@ -182,7 +182,7 @@ class AutoConfigurationSorter {
|
||||
private Set<String> readAfter() {
|
||||
if (wasProcessed()) {
|
||||
return this.autoConfigurationMetadata.getSet(this.className,
|
||||
"AutoConfigureAfter", Collections.<String>emptySet());
|
||||
"AutoConfigureAfter", Collections.emptySet());
|
||||
}
|
||||
return getAnnotationValue(AutoConfigureAfter.class);
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ class ImportAutoConfigurationImportSelector extends AutoConfigurationImportSelec
|
||||
Set<String> result = new LinkedHashSet<>();
|
||||
result.addAll(getCandidateConfigurations(metadata, null));
|
||||
result.removeAll(getExclusions(metadata, null));
|
||||
return Collections.<Object>unmodifiableSet(result);
|
||||
return Collections.unmodifiableSet(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -42,7 +42,7 @@ public class CacheManagerCustomizers {
|
||||
public CacheManagerCustomizers(
|
||||
List<? extends CacheManagerCustomizer<?>> customizers) {
|
||||
this.customizers = (customizers != null ? new ArrayList<>(customizers)
|
||||
: Collections.<CacheManagerCustomizer<?>>emptyList());
|
||||
: Collections.emptyList());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -62,7 +62,7 @@ public class EntityScanner {
|
||||
throws ClassNotFoundException {
|
||||
List<String> packages = getPackages();
|
||||
if (packages.isEmpty()) {
|
||||
return Collections.<Class<?>>emptySet();
|
||||
return Collections.emptySet();
|
||||
}
|
||||
Set<Class<?>> entitySet = new HashSet<>();
|
||||
ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(
|
||||
|
||||
@@ -104,7 +104,7 @@ public class HttpMessageConverters implements Iterable<HttpMessageConverter<?>>
|
||||
Collection<HttpMessageConverter<?>> converters) {
|
||||
List<HttpMessageConverter<?>> combined = getCombinedConverters(converters,
|
||||
addDefaultConverters ? getDefaultConverters()
|
||||
: Collections.<HttpMessageConverter<?>>emptyList());
|
||||
: Collections.emptyList());
|
||||
combined = postProcessConverters(combined);
|
||||
this.converters = Collections.unmodifiableList(combined);
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ public class HttpMessageConvertersAutoConfiguration {
|
||||
@ConditionalOnMissingBean
|
||||
public HttpMessageConverters messageConverters() {
|
||||
return new HttpMessageConverters(this.converters == null
|
||||
? Collections.<HttpMessageConverter<?>>emptyList() : this.converters);
|
||||
? Collections.emptyList() : this.converters);
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -49,7 +49,7 @@ class ActiveMQConnectionFactoryFactory {
|
||||
Assert.notNull(properties, "Properties must not be null");
|
||||
this.properties = properties;
|
||||
this.factoryCustomizers = (factoryCustomizers != null ? factoryCustomizers
|
||||
: Collections.<ActiveMQConnectionFactoryCustomizer>emptyList());
|
||||
: Collections.emptyList());
|
||||
}
|
||||
|
||||
public <T extends ActiveMQConnectionFactory> T createConnectionFactory(
|
||||
|
||||
@@ -57,7 +57,7 @@ public class LdapAutoConfiguration {
|
||||
source.setBase(this.properties.getBase());
|
||||
source.setUrls(this.properties.determineUrls(this.environment));
|
||||
source.setBaseEnvironmentProperties(Collections
|
||||
.<String, Object>unmodifiableMap(this.properties.getBaseEnvironment()));
|
||||
.unmodifiableMap(this.properties.getBaseEnvironment()));
|
||||
return source;
|
||||
}
|
||||
|
||||
|
||||
@@ -258,7 +258,7 @@ public class EmbeddedMongoAutoConfiguration {
|
||||
Set<Feature> features) {
|
||||
Assert.notNull(version, "version must not be null");
|
||||
this.version = version;
|
||||
this.features = (features == null ? Collections.<Feature>emptySet()
|
||||
this.features = (features == null ? Collections.emptySet()
|
||||
: features);
|
||||
}
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ public class BasicErrorController extends AbstractErrorController {
|
||||
public BasicErrorController(ErrorAttributes errorAttributes,
|
||||
ErrorProperties errorProperties) {
|
||||
this(errorAttributes, errorProperties,
|
||||
Collections.<ErrorViewResolver>emptyList());
|
||||
Collections.emptyList());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -248,7 +248,7 @@ public class AutoConfigurationImportSelectorTests {
|
||||
|
||||
@Override
|
||||
protected List<AutoConfigurationImportListener> getAutoConfigurationImportListeners() {
|
||||
return Collections.<AutoConfigurationImportListener>singletonList(
|
||||
return Collections.singletonList(
|
||||
(event) -> this.lastEvent = event);
|
||||
}
|
||||
|
||||
|
||||
@@ -936,7 +936,7 @@ public class CacheAutoConfigurationTests {
|
||||
public javax.cache.CacheManager customJCacheCacheManager() {
|
||||
javax.cache.CacheManager cacheManager = mock(javax.cache.CacheManager.class);
|
||||
given(cacheManager.getCacheNames())
|
||||
.willReturn(Collections.<String>emptyList());
|
||||
.willReturn(Collections.emptyList());
|
||||
return cacheManager;
|
||||
}
|
||||
|
||||
|
||||
@@ -76,10 +76,10 @@ public class OnClassConditionAutoConfigurationImportFilterTests {
|
||||
AutoConfigurationMetadata metadata = mock(AutoConfigurationMetadata.class);
|
||||
given(metadata.wasProcessed("test.match")).willReturn(true);
|
||||
given(metadata.getSet("test.match", "ConditionalOnClass"))
|
||||
.willReturn(Collections.<String>singleton("java.io.InputStream"));
|
||||
.willReturn(Collections.singleton("java.io.InputStream"));
|
||||
given(metadata.wasProcessed("test.nomatch")).willReturn(true);
|
||||
given(metadata.getSet("test.nomatch", "ConditionalOnClass"))
|
||||
.willReturn(Collections.<String>singleton("java.io.DoesNotExist"));
|
||||
.willReturn(Collections.singleton("java.io.DoesNotExist"));
|
||||
return metadata;
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ public class EntityScanPackagesTests {
|
||||
throws Exception {
|
||||
this.thrown.expect(IllegalArgumentException.class);
|
||||
this.thrown.expectMessage("Registry must not be null");
|
||||
EntityScanPackages.register(null, Collections.<String>emptyList());
|
||||
EntityScanPackages.register(null, Collections.emptyList());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -103,7 +103,7 @@ public class HazelcastJpaDependencyAutoConfigurationTests {
|
||||
.getSourceApplicationContext()).getBeanDefinition("entityManagerFactory")
|
||||
.getDependsOn();
|
||||
return dependsOn != null ? Arrays.asList(dependsOn)
|
||||
: Collections.<String>emptyList();
|
||||
: Collections.emptyList();
|
||||
}
|
||||
|
||||
@Configuration
|
||||
|
||||
@@ -88,7 +88,7 @@ public class ActiveMQPropertiesTests {
|
||||
private ActiveMQConnectionFactoryFactory createFactory(
|
||||
ActiveMQProperties properties) {
|
||||
return new ActiveMQConnectionFactoryFactory(properties,
|
||||
Collections.<ActiveMQConnectionFactoryCustomizer>emptyList());
|
||||
Collections.emptyList());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ public class JndiPropertiesHidingClassLoader extends ClassLoader {
|
||||
@Override
|
||||
public Enumeration<URL> getResources(String name) throws IOException {
|
||||
if ("jndi.properties".equals(name)) {
|
||||
return Collections.enumeration(Collections.<URL>emptyList());
|
||||
return Collections.enumeration(Collections.emptyList());
|
||||
}
|
||||
return super.getResources(name);
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ public class DeviceDelegatingViewResolverAutoConfigurationTests {
|
||||
|
||||
@Test
|
||||
public void deviceDelegatingFreeMarkerViewResolver() throws Exception {
|
||||
load(Collections.<Class<?>>singletonList(FreeMarkerAutoConfiguration.class),
|
||||
load(Collections.singletonList(FreeMarkerAutoConfiguration.class),
|
||||
"spring.mobile.devicedelegatingviewresolver.enabled:true");
|
||||
assertThat(this.context.getBeansOfType(LiteDeviceDelegatingViewResolver.class))
|
||||
.hasSize(2);
|
||||
@@ -100,7 +100,7 @@ public class DeviceDelegatingViewResolverAutoConfigurationTests {
|
||||
|
||||
@Test
|
||||
public void deviceDelegatingGroovyMarkupViewResolver() throws Exception {
|
||||
load(Collections.<Class<?>>singletonList(GroovyTemplateAutoConfiguration.class),
|
||||
load(Collections.singletonList(GroovyTemplateAutoConfiguration.class),
|
||||
"spring.mobile.devicedelegatingviewresolver.enabled:true");
|
||||
assertThat(this.context.getBeansOfType(LiteDeviceDelegatingViewResolver.class))
|
||||
.hasSize(2);
|
||||
@@ -111,7 +111,7 @@ public class DeviceDelegatingViewResolverAutoConfigurationTests {
|
||||
|
||||
@Test
|
||||
public void deviceDelegatingMustacheViewResolver() throws Exception {
|
||||
load(Collections.<Class<?>>singletonList(MustacheAutoConfiguration.class),
|
||||
load(Collections.singletonList(MustacheAutoConfiguration.class),
|
||||
"spring.mobile.devicedelegatingviewresolver.enabled:true");
|
||||
assertThat(this.context.getBeansOfType(LiteDeviceDelegatingViewResolver.class))
|
||||
.hasSize(2);
|
||||
@@ -122,7 +122,7 @@ public class DeviceDelegatingViewResolverAutoConfigurationTests {
|
||||
|
||||
@Test
|
||||
public void deviceDelegatingThymeleafViewResolver() throws Exception {
|
||||
load(Collections.<Class<?>>singletonList(ThymeleafAutoConfiguration.class),
|
||||
load(Collections.singletonList(ThymeleafAutoConfiguration.class),
|
||||
"spring.mobile.devicedelegatingviewresolver.enabled:true");
|
||||
assertThat(this.context.getBeansOfType(LiteDeviceDelegatingViewResolver.class))
|
||||
.hasSize(2);
|
||||
|
||||
Reference in New Issue
Block a user