You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by he...@apache.org on 2008/06/11 20:11:01 UTC
svn commit: r666756 - in
/struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest:
./ handler/
Author: hermanns
Date: Wed Jun 11 11:11:00 2008
New Revision: 666756
URL: http://svn.apache.org/viewvc?rev=666756&view=rev
Log:
WW-2623 Struts 2.1.3 omnibus ticket
o optimzed imports
Modified:
struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeHandlerManager.java
struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeInterceptor.java
struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultHttpHeaders.java
struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java
struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionProxyFactory.java
struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestWorkflowInterceptor.java
struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/ContentTypeHandler.java
struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JsonLibHandler.java
struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/XStreamHandler.java
Modified: struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeHandlerManager.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeHandlerManager.java?rev=666756&r1=666755&r2=666756&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeHandlerManager.java (original)
+++ struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeHandlerManager.java Wed Jun 11 11:11:00 2008
@@ -32,7 +32,6 @@
import javax.servlet.http.HttpServletResponse;
import static javax.servlet.http.HttpServletResponse.SC_NOT_MODIFIED;
import static javax.servlet.http.HttpServletResponse.SC_OK;
-import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.StringWriter;
import java.util.HashMap;
Modified: struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeInterceptor.java?rev=666756&r1=666755&r2=666756&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeInterceptor.java (original)
+++ struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/ContentTypeInterceptor.java Wed Jun 11 11:11:00 2008
@@ -21,19 +21,17 @@
package org.apache.struts2.rest;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.Reader;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.struts2.ServletActionContext;
-import org.apache.struts2.rest.handler.ContentTypeHandler;
-
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ModelDriven;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.interceptor.Interceptor;
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.rest.handler.ContentTypeHandler;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
/**
* Uses the content handler to apply the request body to the action
Modified: struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultHttpHeaders.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultHttpHeaders.java?rev=666756&r1=666755&r2=666756&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultHttpHeaders.java (original)
+++ struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/DefaultHttpHeaders.java Wed Jun 11 11:11:00 2008
@@ -23,9 +23,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import static javax.servlet.http.HttpServletResponse.SC_NOT_MODIFIED;
-import static javax.servlet.http.HttpServletResponse.SC_OK;
-import static javax.servlet.http.HttpServletResponse.SC_CREATED;
+import static javax.servlet.http.HttpServletResponse.*;
import java.util.Date;
/**
Modified: struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java?rev=666756&r1=666755&r2=666756&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java (original)
+++ struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java Wed Jun 11 11:11:00 2008
@@ -21,49 +21,19 @@
package org.apache.struts2.rest;
-import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.ActionEventListener;
import com.opensymphony.xwork2.ActionInvocation;
-import com.opensymphony.xwork2.ActionProxy;
import com.opensymphony.xwork2.DefaultActionInvocation;
-import com.opensymphony.xwork2.ModelDriven;
-import com.opensymphony.xwork2.ObjectFactory;
import com.opensymphony.xwork2.Result;
-import com.opensymphony.xwork2.UnknownHandler;
-import com.opensymphony.xwork2.config.ConfigurationException;
import com.opensymphony.xwork2.config.entities.ActionConfig;
-import com.opensymphony.xwork2.config.entities.InterceptorMapping;
-import com.opensymphony.xwork2.config.entities.ResultConfig;
-import com.opensymphony.xwork2.conversion.impl.XWorkConverter;
-import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.Inject;
-import com.opensymphony.xwork2.interceptor.PreResultListener;
-import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.ValueStackFactory;
+import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
import com.opensymphony.xwork2.util.profiling.UtilTimerStack;
-import com.opensymphony.xwork2.util.logging.Logger;
-import org.apache.struts2.ServletActionContext;
-import org.apache.struts2.rest.handler.ContentTypeHandler;
-
-import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
-import java.lang.reflect.Proxy;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
import java.util.Map;
-import java.util.Set;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
/**
Modified: struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionProxyFactory.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionProxyFactory.java?rev=666756&r1=666755&r2=666756&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionProxyFactory.java (original)
+++ struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionProxyFactory.java Wed Jun 11 11:11:00 2008
@@ -21,14 +21,11 @@
package org.apache.struts2.rest;
-import java.util.Map;
-
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.ActionProxy;
-import com.opensymphony.xwork2.DefaultActionInvocation;
import com.opensymphony.xwork2.DefaultActionProxyFactory;
-import com.opensymphony.xwork2.inject.Container;
-import com.opensymphony.xwork2.inject.Inject;
+
+import java.util.Map;
/**
Modified: struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestWorkflowInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestWorkflowInterceptor.java?rev=666756&r1=666755&r2=666756&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestWorkflowInterceptor.java (original)
+++ struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestWorkflowInterceptor.java Wed Jun 11 11:11:00 2008
@@ -21,12 +21,6 @@
package org.apache.struts2.rest;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.struts2.ServletActionContext;
-import org.apache.struts2.dispatcher.mapper.ActionMapping;
-
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
@@ -35,8 +29,12 @@
import com.opensymphony.xwork2.interceptor.MethodFilterInterceptor;
import com.opensymphony.xwork2.util.logging.Logger;
import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.dispatcher.mapper.ActionMapping;
-import static javax.servlet.http.HttpServletResponse.*;
+import static javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST;
+import java.util.HashMap;
+import java.util.Map;
/**
* <!-- START SNIPPET: description -->
Modified: struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/ContentTypeHandler.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/ContentTypeHandler.java?rev=666756&r1=666755&r2=666756&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/ContentTypeHandler.java (original)
+++ struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/ContentTypeHandler.java Wed Jun 11 11:11:00 2008
@@ -21,9 +21,9 @@
package org.apache.struts2.rest.handler;
-import java.io.*;
-
-import com.opensymphony.xwork2.ActionInvocation;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
/**
* Handles transferring content to and from objects for a specific content type
Modified: struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JsonLibHandler.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JsonLibHandler.java?rev=666756&r1=666755&r2=666756&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JsonLibHandler.java (original)
+++ struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/JsonLibHandler.java Wed Jun 11 11:11:00 2008
@@ -21,12 +21,14 @@
package org.apache.struts2.rest.handler;
-import java.io.*;
-import java.util.Collection;
-
+import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import net.sf.json.JsonConfig;
-import net.sf.json.JSONArray;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+import java.util.Collection;
/**
* Handles JSON content using json-lib
Modified: struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/XStreamHandler.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/XStreamHandler.java?rev=666756&r1=666755&r2=666756&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/XStreamHandler.java (original)
+++ struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/handler/XStreamHandler.java Wed Jun 11 11:11:00 2008
@@ -21,12 +21,12 @@
package org.apache.struts2.rest.handler;
+import com.thoughtworks.xstream.XStream;
+
import java.io.IOException;
import java.io.Reader;
import java.io.Writer;
-import com.thoughtworks.xstream.XStream;
-
/**
* Handles XML content
*/