Refactor iterator of Map with Java8's Map.forEach
See gh-1459
This commit is contained in:
@@ -106,9 +106,7 @@ public class MethodMapTransactionAttributeSource
|
||||
*/
|
||||
protected void initMethodMap(@Nullable Map<String, TransactionAttribute> methodMap) {
|
||||
if (methodMap != null) {
|
||||
for (Map.Entry<String, TransactionAttribute> entry : methodMap.entrySet()) {
|
||||
addTransactionalMethod(entry.getKey(), entry.getValue());
|
||||
}
|
||||
methodMap.forEach(this::addTransactionalMethod);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,9 +61,7 @@ public class NameMatchTransactionAttributeSource implements TransactionAttribute
|
||||
* @see TransactionAttributeEditor
|
||||
*/
|
||||
public void setNameMap(Map<String, TransactionAttribute> nameMap) {
|
||||
for (Map.Entry<String, TransactionAttribute> entry : nameMap.entrySet()) {
|
||||
addTransactionalMethod(entry.getKey(), entry.getValue());
|
||||
}
|
||||
nameMap.forEach(this::addTransactionalMethod);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user