Author: jafl Date: Sun Jan 30 19:00:06 2011 New Revision: 1065348 URL: http://svn.apache.org/viewvc?rev=1065348&view=rev Log: WW-3525 JSONInterceptor extends AbstractInterceptor
Modified: struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java Modified: struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java?rev=1065348&r1=1065347&r2=1065348&view=diff ============================================================================== --- struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java (original) +++ struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java Sun Jan 30 19:00:06 2011 @@ -42,7 +42,7 @@ import org.apache.struts2.json.rpc.RPCRe 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.logg /** * 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 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 } /** - * 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; }