Iteration over a map using EntrySet
This commit is contained in:
committed by
Juergen Hoeller
parent
785e8d8116
commit
9ca8681f79
@@ -640,9 +640,10 @@ public abstract class AbstractMethodMessageHandler<T>
|
||||
if (method != null) {
|
||||
return new InvocableHandlerMethod(handlerMethod.getBean(), method);
|
||||
}
|
||||
for (MessagingAdviceBean advice : this.exceptionHandlerAdviceCache.keySet()) {
|
||||
for (Map.Entry<MessagingAdviceBean, AbstractExceptionHandlerMethodResolver> entry : this.exceptionHandlerAdviceCache.entrySet()) {
|
||||
MessagingAdviceBean advice = entry.getKey();
|
||||
if (advice.isApplicableToBeanType(beanType)) {
|
||||
resolver = this.exceptionHandlerAdviceCache.get(advice);
|
||||
resolver = entry.getValue();
|
||||
method = resolver.resolveMethod(exception);
|
||||
if (method != null) {
|
||||
return new InvocableHandlerMethod(advice.resolveBean(), method);
|
||||
|
||||
@@ -155,9 +155,10 @@ class InvocableHelper {
|
||||
exceptionHandlerMethod = new InvocableHandlerMethod(handlerMethod.getBean(), method);
|
||||
}
|
||||
else {
|
||||
for (MessagingAdviceBean advice : this.exceptionHandlerAdviceCache.keySet()) {
|
||||
for (Map.Entry<MessagingAdviceBean, AbstractExceptionHandlerMethodResolver> entry : this.exceptionHandlerAdviceCache.entrySet()) {
|
||||
MessagingAdviceBean advice = entry.getKey();
|
||||
if (advice.isApplicableToBeanType(beanType)) {
|
||||
resolver = this.exceptionHandlerAdviceCache.get(advice);
|
||||
resolver = entry.getValue();
|
||||
method = resolver.resolveMethod(ex);
|
||||
if (method != null) {
|
||||
exceptionHandlerMethod = new InvocableHandlerMethod(advice.resolveBean(), method);
|
||||
|
||||
Reference in New Issue
Block a user