WW-3525 JSONInterceptor extends AbstractInterceptor

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1065348 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Lindal
2011-01-30 19:00:06 +00:00
parent 62353788ac
commit 109b18ca50
@@ -42,7 +42,7 @@ import org.apache.struts2.json.rpc.RPCResponse;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.interceptor.Interceptor;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
import com.opensymphony.xwork2.util.ValueStack;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
@@ -50,7 +50,7 @@ import com.opensymphony.xwork2.util.logging.LoggerFactory;
/**
* Populates an action from a JSON string
*/
public class JSONInterceptor implements Interceptor {
public class JSONInterceptor extends AbstractInterceptor {
private static final long serialVersionUID = 4950170304212158803L;
private static final Logger LOG = LoggerFactory.getLogger(JSONInterceptor.class);
private boolean enableSMD = false;
@@ -71,12 +71,6 @@ public class JSONInterceptor implements Interceptor {
private String callbackParameter;
private String contentType;
public void destroy() {
}
public void init() {
}
@SuppressWarnings("unchecked")
public String intercept(ActionInvocation invocation) throws Exception {
HttpServletRequest request = ServletActionContext.getRequest();
@@ -370,15 +364,18 @@ public class JSONInterceptor implements Interceptor {
}
/**
* Turns debugging on or off
*
* @param debug
* true or false
* @return true if debugging is turned on
*/
public boolean getDebug() {
return this.debug;
}
/**
* Turns debugging on or off
*
* @param debug
* true or false
*/
public void setDebug(boolean debug) {
this.debug = debug;
}