Explicit type can be replaced by <>

Issue: SPR-13188
This commit is contained in:
Stephane Nicoll
2016-07-05 17:00:26 +02:00
parent 3096888c7d
commit 00d2606b00
1044 changed files with 3972 additions and 3893 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -41,7 +41,7 @@ public class TigerAspectJExpressionPointcutTests {
// TODO factor into static in AspectJExpressionPointcut
private Method getAge;
private Map<String,Method> methodsOnHasGeneric = new HashMap<String,Method>();
private Map<String,Method> methodsOnHasGeneric = new HashMap<>();
@Before

View File

@@ -138,7 +138,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests {
int realAge = 65;
target.setAge(realAge);
List<Advisor> advisors = new LinkedList<Advisor>();
List<Advisor> advisors = new LinkedList<>();
PerTargetAspect aspect1 = new PerTargetAspect();
aspect1.count = 100;
aspect1.setOrder(10);
@@ -166,7 +166,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests {
int realAge = 65;
target.setAge(realAge);
List<Advisor> advisors = new LinkedList<Advisor>();
List<Advisor> advisors = new LinkedList<>();
PerTargetAspectWithOrderAnnotation10 aspect1 = new PerTargetAspectWithOrderAnnotation10();
aspect1.count = 100;
advisors.addAll(
@@ -402,7 +402,7 @@ public abstract class AbstractAspectJAdvisorFactoryTests {
@Test
public void testIntroductionOnTargetExcludedByTypePattern() {
LinkedList<Object> target = new LinkedList<Object>();
LinkedList<Object> target = new LinkedList<>();
List<?> proxy = (List<?>) createProxy(target,
AopUtils.findAdvisorsThatCanApply(
getFixture().getAdvisors(new SingletonMetadataAwareAspectInstanceFactory(new MakeLockable(), "someBean")),

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -172,7 +172,7 @@ public final class AopNamespaceHandlerEventTests {
BeanReference[] beanReferences = acd.getBeanReferences();
assertEquals(6, beanReferences.length);
Set<String> expectedReferences = new HashSet<String>();
Set<String> expectedReferences = new HashSet<>();
expectedReferences.add("pc");
expectedReferences.add("countingAdvice");
for (int i = 0; i < beanReferences.length; i++) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -40,7 +40,7 @@ public final class MethodInvocationTests {
Method m = Object.class.getMethod("hashCode");
Object proxy = new Object();
final Object returnValue = new Object();
List<Object> is = new LinkedList<Object>();
List<Object> is = new LinkedList<>();
is.add(new MethodInterceptor() {
@Override
public Object invoke(MethodInvocation invocation) throws Throwable {
@@ -65,7 +65,7 @@ public final class MethodInvocationTests {
throw new UnsupportedOperationException("toString");
}
};
List<Object> is = new LinkedList<Object>();
List<Object> is = new LinkedList<>();
Method m = Object.class.getMethod("hashCode");
Object proxy = new Object();

View File

@@ -345,7 +345,7 @@ public class ProxyFactoryTests {
public void testInterfaceProxiesCanBeOrderedThroughAnnotations() {
Object proxy1 = new ProxyFactory(new A()).getProxy();
Object proxy2 = new ProxyFactory(new B()).getProxy();
List<Object> list = new ArrayList<Object>(2);
List<Object> list = new ArrayList<>(2);
list.add(proxy1);
list.add(proxy2);
AnnotationAwareOrderComparator.sort(list);
@@ -361,7 +361,7 @@ public class ProxyFactoryTests {
pf2.setProxyTargetClass(true);
Object proxy1 = pf1.getProxy();
Object proxy2 = pf2.getProxy();
List<Object> list = new ArrayList<Object>(2);
List<Object> list = new ArrayList<>(2);
list.add(proxy1);
list.add(proxy2);
AnnotationAwareOrderComparator.sort(list);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,7 +30,7 @@ import java.util.HashMap;
public class MethodCounter implements Serializable {
/** Method name --> count, does not understand overloading */
private HashMap<String, Integer> map = new HashMap<String, Integer>();
private HashMap<String, Integer> map = new HashMap<>();
private int allCount;