diff --git a/core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorMapping.java b/core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorMapping.java index 260ae325b1..6625bc7a13 100644 --- a/core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorMapping.java +++ b/core/src/main/java/com/opensymphony/xwork2/config/entities/InterceptorMapping.java @@ -36,8 +36,16 @@ public class InterceptorMapping implements Serializable { private Interceptor interceptor; private final Map params; + public InterceptorMapping(String name, org.apache.struts2.interceptor.Interceptor interceptor) { + this(name, Interceptor.adapt(interceptor)); + } + + public InterceptorMapping(String name, org.apache.struts2.interceptor.Interceptor interceptor, Map params) { + this(name, Interceptor.adapt(interceptor), params); + } + public InterceptorMapping(String name, Interceptor interceptor) { - this(name, interceptor, new HashMap()); + this(name, interceptor, new HashMap<>()); } public InterceptorMapping(String name, Interceptor interceptor, Map params) {