WW-4553 Merges #55 which moves creation of interceptors list and iterator to a factory method to allow overriding it

This commit is contained in:
Christoph Nenning
2015-10-12 12:54:51 +02:00
@@ -396,7 +396,11 @@ public class DefaultActionInvocation implements ActionInvocation {
invocationContext = new ActionContext(contextMap);
invocationContext.setName(proxy.getActionName());
// get a new List so we don't get problems with the iterator if someone changes the list
createInterceptors(proxy);
}
protected void createInterceptors(ActionProxy proxy) {
// Get a new List so we don't get problems with the iterator if someone changes the original list
List<InterceptorMapping> interceptorList = new ArrayList<>(proxy.getConfig().getInterceptors());
interceptors = interceptorList.iterator();
}