Use Java 8 forEach method on Map

This commit is contained in:
Jon Borenstein
2017-04-25 18:00:38 -04:00
committed by Stephane Nicoll
parent 1ea54eb2c6
commit 13dc0cd828
8 changed files with 29 additions and 34 deletions

View File

@@ -192,11 +192,12 @@ public abstract class AbstractHandlerMethodMapping<T> extends AbstractHandlerMap
if (logger.isDebugEnabled()) {
logger.debug(methods.size() + " request handler methods found on " + userType + ": " + methods);
}
for (Map.Entry<Method, T> entry : methods.entrySet()) {
methods.entrySet().forEach(entry -> {
Method invocableMethod = AopUtils.selectInvocableMethod(entry.getKey(), userType);
T mapping = entry.getValue();
registerHandlerMethod(handler, invocableMethod, mapping);
}
});
}
/**