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-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.
@@ -34,7 +34,7 @@ import org.springframework.util.Assert;
public class ChainedPersistenceExceptionTranslator implements PersistenceExceptionTranslator {
/** List of PersistenceExceptionTranslators */
private final List<PersistenceExceptionTranslator> delegates = new ArrayList<PersistenceExceptionTranslator>(4);
private final List<PersistenceExceptionTranslator> delegates = new ArrayList<>(4);
/**

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.
@@ -68,7 +68,7 @@ public class ConnectionSpecConnectionFactoryAdapter extends DelegatingConnection
private ConnectionSpec connectionSpec;
private final ThreadLocal<ConnectionSpec> threadBoundSpec =
new NamedThreadLocal<ConnectionSpec>("Current CCI ConnectionSpec");
new NamedThreadLocal<>("Current CCI ConnectionSpec");
/**

View File

@@ -258,28 +258,28 @@ public class WorkManagerTaskExecutor extends JndiLocatorSupport
@Override
public Future<?> submit(Runnable task) {
FutureTask<Object> future = new FutureTask<Object>(task, null);
FutureTask<Object> future = new FutureTask<>(task, null);
execute(future, TIMEOUT_INDEFINITE);
return future;
}
@Override
public <T> Future<T> submit(Callable<T> task) {
FutureTask<T> future = new FutureTask<T>(task);
FutureTask<T> future = new FutureTask<>(task);
execute(future, TIMEOUT_INDEFINITE);
return future;
}
@Override
public ListenableFuture<?> submitListenable(Runnable task) {
ListenableFutureTask<Object> future = new ListenableFutureTask<Object>(task, null);
ListenableFutureTask<Object> future = new ListenableFutureTask<>(task, null);
execute(future, TIMEOUT_INDEFINITE);
return future;
}
@Override
public <T> ListenableFuture<T> submitListenable(Callable<T> task) {
ListenableFutureTask<T> future = new ListenableFutureTask<T>(task);
ListenableFutureTask<T> future = new ListenableFutureTask<>(task);
execute(future, TIMEOUT_INDEFINITE);
return future;
}

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.
@@ -85,7 +85,7 @@ public class AnnotationTransactionAttributeSource extends AbstractFallbackTransa
*/
public AnnotationTransactionAttributeSource(boolean publicMethodsOnly) {
this.publicMethodsOnly = publicMethodsOnly;
this.annotationParsers = new LinkedHashSet<TransactionAnnotationParser>(2);
this.annotationParsers = new LinkedHashSet<>(2);
this.annotationParsers.add(new SpringTransactionAnnotationParser());
if (jta12Present) {
this.annotationParsers.add(new JtaTransactionAnnotationParser());
@@ -112,7 +112,7 @@ public class AnnotationTransactionAttributeSource extends AbstractFallbackTransa
public AnnotationTransactionAttributeSource(TransactionAnnotationParser... annotationParsers) {
this.publicMethodsOnly = true;
Assert.notEmpty(annotationParsers, "At least one TransactionAnnotationParser needs to be specified");
Set<TransactionAnnotationParser> parsers = new LinkedHashSet<TransactionAnnotationParser>(annotationParsers.length);
Set<TransactionAnnotationParser> parsers = new LinkedHashSet<>(annotationParsers.length);
Collections.addAll(parsers, annotationParsers);
this.annotationParsers = parsers;
}

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.
@@ -56,7 +56,7 @@ public class JtaTransactionAnnotationParser implements TransactionAnnotationPars
RuleBasedTransactionAttribute rbta = new RuleBasedTransactionAttribute();
rbta.setPropagationBehaviorName(
RuleBasedTransactionAttribute.PREFIX_PROPAGATION + attributes.getEnum("value").toString());
ArrayList<RollbackRuleAttribute> rollBackRules = new ArrayList<RollbackRuleAttribute>();
ArrayList<RollbackRuleAttribute> rollBackRules = new ArrayList<>();
Class<?>[] rbf = attributes.getClassArray("rollbackOn");
for (Class<?> rbRule : rbf) {
RollbackRuleAttribute rule = new RollbackRuleAttribute(rbRule);

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.
@@ -61,7 +61,7 @@ public class SpringTransactionAnnotationParser implements TransactionAnnotationP
rbta.setTimeout(attributes.getNumber("timeout").intValue());
rbta.setReadOnly(attributes.getBoolean("readOnly"));
rbta.setQualifier(attributes.getString("value"));
ArrayList<RollbackRuleAttribute> rollBackRules = new ArrayList<RollbackRuleAttribute>();
ArrayList<RollbackRuleAttribute> rollBackRules = new ArrayList<>();
Class<?>[] rbf = attributes.getClassArray("rollbackFor");
for (Class<?> rbRule : rbf) {
RollbackRuleAttribute rule = new RollbackRuleAttribute(rbRule);

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.
@@ -96,7 +96,7 @@ class TxAdviceBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
private RootBeanDefinition parseAttributeSource(Element attrEle, ParserContext parserContext) {
List<Element> methods = DomUtils.getChildElementsByTagName(attrEle, METHOD_ELEMENT);
ManagedMap<TypedStringValue, RuleBasedTransactionAttribute> transactionAttributeMap =
new ManagedMap<TypedStringValue, RuleBasedTransactionAttribute>(methods.size());
new ManagedMap<>(methods.size());
transactionAttributeMap.setSource(parserContext.extractSource(attrEle));
for (Element methodEle : methods) {
@@ -127,7 +127,7 @@ class TxAdviceBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
attribute.setReadOnly(Boolean.valueOf(methodEle.getAttribute(READ_ONLY_ATTRIBUTE)));
}
List<RollbackRuleAttribute> rollbackRules = new LinkedList<RollbackRuleAttribute>();
List<RollbackRuleAttribute> rollbackRules = new LinkedList<>();
if (methodEle.hasAttribute(ROLLBACK_FOR_ATTRIBUTE)) {
String rollbackForValue = methodEle.getAttribute(ROLLBACK_FOR_ATTRIBUTE);
addRollbackRuleAttributesTo(rollbackRules,rollbackForValue);

View File

@@ -69,7 +69,7 @@ public abstract class AbstractFallbackTransactionAttributeSource implements Tran
* <p>As this base class is not marked Serializable, the cache will be recreated
* after serialization - provided that the concrete subclass is Serializable.
*/
final Map<Object, TransactionAttribute> attributeCache = new ConcurrentHashMap<Object, TransactionAttribute>(1024);
final Map<Object, TransactionAttribute> attributeCache = new ConcurrentHashMap<>(1024);
/**

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.
@@ -59,10 +59,10 @@ public class MethodMapTransactionAttributeSource
/** Map from Method to TransactionAttribute */
private final Map<Method, TransactionAttribute> transactionAttributeMap =
new HashMap<Method, TransactionAttribute>();
new HashMap<>();
/** Map from Method to name pattern used for registration */
private final Map<Method, String> methodNameMap = new HashMap<Method, String>();
private final Map<Method, String> methodNameMap = new HashMap<>();
/**
@@ -145,7 +145,7 @@ public class MethodMapTransactionAttributeSource
String name = clazz.getName() + '.' + mappedName;
Method[] methods = clazz.getDeclaredMethods();
List<Method> matchingMethods = new ArrayList<Method>();
List<Method> matchingMethods = new ArrayList<>();
for (Method method : methods) {
if (isMatch(method.getName(), mappedName)) {
matchingMethods.add(method);

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.
@@ -49,7 +49,7 @@ public class NameMatchTransactionAttributeSource implements TransactionAttribute
protected static final Log logger = LogFactory.getLog(NameMatchTransactionAttributeSource.class);
/** Keys are method names; values are TransactionAttributes */
private Map<String, TransactionAttribute> nameMap = new HashMap<String, TransactionAttribute>();
private Map<String, TransactionAttribute> nameMap = new HashMap<>();
/**

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.
@@ -78,7 +78,7 @@ public class RuleBasedTransactionAttribute extends DefaultTransactionAttribute i
*/
public RuleBasedTransactionAttribute(RuleBasedTransactionAttribute other) {
super(other);
this.rollbackRules = new ArrayList<RollbackRuleAttribute>(other.rollbackRules);
this.rollbackRules = new ArrayList<>(other.rollbackRules);
}
/**
@@ -113,7 +113,7 @@ public class RuleBasedTransactionAttribute extends DefaultTransactionAttribute i
*/
public List<RollbackRuleAttribute> getRollbackRules() {
if (this.rollbackRules == null) {
this.rollbackRules = new LinkedList<RollbackRuleAttribute>();
this.rollbackRules = new LinkedList<>();
}
return this.rollbackRules;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 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.
@@ -82,11 +82,11 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
* single method (as will be the case for around advice).
*/
private static final ThreadLocal<TransactionInfo> transactionInfoHolder =
new NamedThreadLocal<TransactionInfo>("Current aspect-driven transaction");
new NamedThreadLocal<>("Current aspect-driven transaction");
private final ConcurrentHashMap<Object, PlatformTransactionManager> transactionManagerCache =
new ConcurrentHashMap<Object, PlatformTransactionManager>();
new ConcurrentHashMap<>();
/**
* Subclasses can use this to return the current TransactionInfo.

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.
@@ -285,7 +285,7 @@ public class WebSphereUowTransactionManager extends JtaTransactionManager
if (debug) {
logger.debug("Invoking WebSphere UOW action: type=" + uowType + ", join=" + joinTx);
}
UOWActionAdapter<T> action = new UOWActionAdapter<T>(
UOWActionAdapter<T> action = new UOWActionAdapter<>(
definition, callback, (uowType == UOWManager.UOW_TYPE_GLOBAL_TRANSACTION), !joinTx, newSynch, debug);
this.uowManager.runUnderUOW(uowType, joinTx, action);
if (debug) {

View File

@@ -90,9 +90,9 @@ public class SimpleTransactionScope implements Scope {
static class ScopedObjectsHolder {
final Map<String, Object> scopedInstances = new HashMap<String, Object>();
final Map<String, Object> scopedInstances = new HashMap<>();
final Map<String, Runnable> destructionCallbacks = new LinkedHashMap<String, Runnable>();
final Map<String, Runnable> destructionCallbacks = new LinkedHashMap<>();
}

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.
@@ -78,22 +78,22 @@ public abstract class TransactionSynchronizationManager {
private static final Log logger = LogFactory.getLog(TransactionSynchronizationManager.class);
private static final ThreadLocal<Map<Object, Object>> resources =
new NamedThreadLocal<Map<Object, Object>>("Transactional resources");
new NamedThreadLocal<>("Transactional resources");
private static final ThreadLocal<Set<TransactionSynchronization>> synchronizations =
new NamedThreadLocal<Set<TransactionSynchronization>>("Transaction synchronizations");
new NamedThreadLocal<>("Transaction synchronizations");
private static final ThreadLocal<String> currentTransactionName =
new NamedThreadLocal<String>("Current transaction name");
new NamedThreadLocal<>("Current transaction name");
private static final ThreadLocal<Boolean> currentTransactionReadOnly =
new NamedThreadLocal<Boolean>("Current transaction read-only status");
new NamedThreadLocal<>("Current transaction read-only status");
private static final ThreadLocal<Integer> currentTransactionIsolationLevel =
new NamedThreadLocal<Integer>("Current transaction isolation level");
new NamedThreadLocal<>("Current transaction isolation level");
private static final ThreadLocal<Boolean> actualTransactionActive =
new NamedThreadLocal<Boolean>("Actual transaction active");
new NamedThreadLocal<>("Actual transaction active");
//-------------------------------------------------------------------------
@@ -177,7 +177,7 @@ public abstract class TransactionSynchronizationManager {
Map<Object, Object> map = resources.get();
// set ThreadLocal Map if none found
if (map == null) {
map = new HashMap<Object, Object>();
map = new HashMap<>();
resources.set(map);
}
Object oldValue = map.put(actualKey, value);
@@ -270,7 +270,7 @@ public abstract class TransactionSynchronizationManager {
throw new IllegalStateException("Cannot activate transaction synchronization - already active");
}
logger.trace("Initializing transaction synchronization");
synchronizations.set(new LinkedHashSet<TransactionSynchronization>());
synchronizations.set(new LinkedHashSet<>());
}
/**
@@ -313,7 +313,7 @@ public abstract class TransactionSynchronizationManager {
}
else {
// Sort lazily here, not in registerSynchronization.
List<TransactionSynchronization> sortedSynchs = new ArrayList<TransactionSynchronization>(synchs);
List<TransactionSynchronization> sortedSynchs = new ArrayList<>(synchs);
AnnotationAwareOrderComparator.sort(sortedSynchs);
return Collections.unmodifiableList(sortedSynchs);
}

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 class DataAccessUtilsTests {
@Test
public void withEmptyCollection() {
Collection<String> col = new HashSet<String>();
Collection<String> col = new HashSet<>();
assertNull(DataAccessUtils.uniqueResult(col));
@@ -87,7 +87,7 @@ public class DataAccessUtilsTests {
@Test
public void withTooLargeCollection() {
Collection<String> col = new HashSet<String>(2);
Collection<String> col = new HashSet<>(2);
col.add("test1");
col.add("test2");
@@ -144,7 +144,7 @@ public class DataAccessUtilsTests {
@Test
public void withInteger() {
Collection<Integer> col = new HashSet<Integer>(1);
Collection<Integer> col = new HashSet<>(1);
col.add(5);
assertEquals(Integer.valueOf(5), DataAccessUtils.uniqueResult(col));
@@ -158,7 +158,7 @@ public class DataAccessUtilsTests {
@Test
public void withSameIntegerInstanceTwice() {
Integer i = 5;
Collection<Integer> col = new ArrayList<Integer>(1);
Collection<Integer> col = new ArrayList<>(1);
col.add(i);
col.add(i);
@@ -172,7 +172,7 @@ public class DataAccessUtilsTests {
@Test
public void withEquivalentIntegerInstanceTwice() {
Collection<Integer> col = new ArrayList<Integer>(2);
Collection<Integer> col = new ArrayList<>(2);
col.add(new Integer(5));
col.add(new Integer(5));
@@ -189,7 +189,7 @@ public class DataAccessUtilsTests {
@Test
public void withLong() {
Collection<Long> col = new HashSet<Long>(1);
Collection<Long> col = new HashSet<>(1);
col.add(5L);
assertEquals(Long.valueOf(5L), DataAccessUtils.uniqueResult(col));
@@ -202,7 +202,7 @@ public class DataAccessUtilsTests {
@Test
public void withString() {
Collection<String> col = new HashSet<String>(1);
Collection<String> col = new HashSet<>(1);
col.add("test1");
assertEquals("test1", DataAccessUtils.uniqueResult(col));
@@ -229,7 +229,7 @@ public class DataAccessUtilsTests {
@Test
public void withDate() {
Date date = new Date();
Collection<Date> col = new HashSet<Date>(1);
Collection<Date> col = new HashSet<>(1);
col.add(date);
assertEquals(date, DataAccessUtils.uniqueResult(col));
@@ -276,7 +276,7 @@ public class DataAccessUtilsTests {
/**
* in to out
*/
private Map<RuntimeException,RuntimeException> translations = new HashMap<RuntimeException,RuntimeException>();
private Map<RuntimeException,RuntimeException> translations = new HashMap<>();
public void addTranslation(RuntimeException in, RuntimeException out) {
this.translations.put(in, out);

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 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.
@@ -28,7 +28,7 @@ import java.util.Map;
*/
public class MapTransactionAttributeSource extends AbstractFallbackTransactionAttributeSource {
private final Map<Object, TransactionAttribute> attributeMap = new HashMap<Object, TransactionAttribute>();
private final Map<Object, TransactionAttribute> attributeMap = new HashMap<>();
public void register(Method method, TransactionAttribute txAtt) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 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.
@@ -51,7 +51,7 @@ public class RuleBasedTransactionAttributeTests {
*/
@Test
public void testRuleForRollbackOnChecked() {
List<RollbackRuleAttribute> list = new LinkedList<RollbackRuleAttribute>();
List<RollbackRuleAttribute> list = new LinkedList<>();
list.add(new RollbackRuleAttribute(IOException.class.getName()));
RuleBasedTransactionAttribute rta = new RuleBasedTransactionAttribute(TransactionDefinition.PROPAGATION_REQUIRED, list);
@@ -64,7 +64,7 @@ public class RuleBasedTransactionAttributeTests {
@Test
public void testRuleForCommitOnUnchecked() {
List<RollbackRuleAttribute> list = new LinkedList<RollbackRuleAttribute>();
List<RollbackRuleAttribute> list = new LinkedList<>();
list.add(new NoRollbackRuleAttribute(MyRuntimeException.class.getName()));
list.add(new RollbackRuleAttribute(IOException.class.getName()));
RuleBasedTransactionAttribute rta = new RuleBasedTransactionAttribute(TransactionDefinition.PROPAGATION_REQUIRED, list);
@@ -79,7 +79,7 @@ public class RuleBasedTransactionAttributeTests {
@Test
public void testRuleForSelectiveRollbackOnCheckedWithString() {
List<RollbackRuleAttribute> l = new LinkedList<RollbackRuleAttribute>();
List<RollbackRuleAttribute> l = new LinkedList<>();
l.add(new RollbackRuleAttribute(java.rmi.RemoteException.class.getName()));
RuleBasedTransactionAttribute rta = new RuleBasedTransactionAttribute(TransactionDefinition.PROPAGATION_REQUIRED, l);
doTestRuleForSelectiveRollbackOnChecked(rta);
@@ -106,7 +106,7 @@ public class RuleBasedTransactionAttributeTests {
*/
@Test
public void testRuleForCommitOnSubclassOfChecked() {
List<RollbackRuleAttribute> list = new LinkedList<RollbackRuleAttribute>();
List<RollbackRuleAttribute> list = new LinkedList<>();
// Note that it's important to ensure that we have this as
// a FQN: otherwise it will match everything!
list.add(new RollbackRuleAttribute("java.lang.Exception"));
@@ -121,7 +121,7 @@ public class RuleBasedTransactionAttributeTests {
@Test
public void testRollbackNever() {
List<RollbackRuleAttribute> list = new LinkedList<RollbackRuleAttribute>();
List<RollbackRuleAttribute> list = new LinkedList<>();
list.add(new NoRollbackRuleAttribute("Throwable"));
RuleBasedTransactionAttribute rta = new RuleBasedTransactionAttribute(TransactionDefinition.PROPAGATION_REQUIRED, list);
@@ -134,7 +134,7 @@ public class RuleBasedTransactionAttributeTests {
@Test
public void testToStringMatchesEditor() {
List<RollbackRuleAttribute> list = new LinkedList<RollbackRuleAttribute>();
List<RollbackRuleAttribute> list = new LinkedList<>();
list.add(new NoRollbackRuleAttribute("Throwable"));
RuleBasedTransactionAttribute rta = new RuleBasedTransactionAttribute(TransactionDefinition.PROPAGATION_REQUIRED, list);
@@ -154,7 +154,7 @@ public class RuleBasedTransactionAttributeTests {
*/
@Test
public void testConflictingRulesToDetermineExactContract() {
List<RollbackRuleAttribute> list = new LinkedList<RollbackRuleAttribute>();
List<RollbackRuleAttribute> list = new LinkedList<>();
list.add(new NoRollbackRuleAttribute(MyBusinessWarningException.class));
list.add(new RollbackRuleAttribute(MyBusinessException.class));
RuleBasedTransactionAttribute rta = new RuleBasedTransactionAttribute(TransactionDefinition.PROPAGATION_REQUIRED, list);

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.
@@ -42,9 +42,9 @@ public class MockUOWManager implements UOWManager {
private int status = UOW_STATUS_NONE;
private final Map<Object, Object> resources = new HashMap<Object, Object>();
private final Map<Object, Object> resources = new HashMap<>();
private final List<Synchronization> synchronizations = new LinkedList<Synchronization>();
private final List<Synchronization> synchronizations = new LinkedList<>();
@Override

View File

@@ -148,7 +148,7 @@ public class SimpleTransactionScopeTests {
CallCountingTransactionManager tm = new CallCountingTransactionManager();
TransactionTemplate tt = new TransactionTemplate(tm);
Set<DerivedTestBean> finallyDestroy = new HashSet<DerivedTestBean>();
Set<DerivedTestBean> finallyDestroy = new HashSet<>();
tt.execute(status -> {
TestBean bean1 = context.getBean(TestBean.class);
@@ -173,7 +173,7 @@ public class SimpleTransactionScopeTests {
assertNotSame(bean2, bean2b);
assertNotSame(bean2a, bean2b);
Set<DerivedTestBean> immediatelyDestroy = new HashSet<DerivedTestBean>();
Set<DerivedTestBean> immediatelyDestroy = new HashSet<>();
TransactionTemplate tt2 = new TransactionTemplate(tm);
tt2.setPropagationBehavior(TransactionTemplate.PROPAGATION_REQUIRED);
tt2.execute(status2 -> {