Replace explicit generics with diamond operator
Where possible, explicit generic declarations to use the Java 8 diamond operator. See gh-9781
This commit is contained in:
committed by
Phillip Webb
parent
eb35fc9fa6
commit
04fdec6f8b
@@ -219,7 +219,7 @@ public class SpringBootTestContextBootstrapper extends DefaultTestContextBootstr
|
||||
ContextConfiguration configuration) {
|
||||
ContextConfigurationAttributes attributes = new ContextConfigurationAttributes(
|
||||
candidateConfig.getTestClass(), configuration);
|
||||
Set<Class<?>> configurationClasses = new HashSet<Class<?>>(
|
||||
Set<Class<?>> configurationClasses = new HashSet<>(
|
||||
Arrays.asList(attributes.getClasses()));
|
||||
for (Class<?> candidate : candidateConfig.getClasses()) {
|
||||
if (configurationClasses.contains(candidate)) {
|
||||
|
||||
@@ -60,7 +60,7 @@ class DuplicateJsonObjectContextCustomizerFactory implements ContextCustomizerFa
|
||||
}
|
||||
|
||||
private List<URL> findJsonObjects() {
|
||||
List<URL> jsonObjects = new ArrayList<URL>();
|
||||
List<URL> jsonObjects = new ArrayList<>();
|
||||
try {
|
||||
Enumeration<URL> resources = getClass().getClassLoader()
|
||||
.getResources("org/json/JSONObject.class");
|
||||
|
||||
@@ -158,7 +158,7 @@ public class JacksonTester<T> extends AbstractJsonMarshalTester<T> {
|
||||
* @return the new instance
|
||||
*/
|
||||
public JacksonTester<T> forView(Class<?> view) {
|
||||
return new JacksonTester<T>(this.getResourceLoadClass(), this.getType(),
|
||||
return new JacksonTester<>(this.getResourceLoadClass(), this.getType(),
|
||||
this.objectMapper, view);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user