struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mr...@apache.org
Subject svn commit: r667732 - /struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletActionRedirectResult.java
Date Sat, 14 Jun 2008 03:19:53 GMT
Author: mrdon
Date: Fri Jun 13 20:19:53 2008
New Revision: 667732

URL: http://svn.apache.org/viewvc?rev=667732&view=rev
Log:
Adding parameter exception handling for portlet redirects
WW-2676

Modified:
    struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletActionRedirectResult.java

Modified: struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletActionRedirectResult.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletActionRedirectResult.java?rev=667732&r1=667731&r2=667732&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletActionRedirectResult.java
(original)
+++ struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/result/PortletActionRedirectResult.java
Fri Jun 13 20:19:53 2008
@@ -36,6 +36,10 @@
 import org.apache.struts2.views.util.UrlHelper;
 
 import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.util.reflection.ReflectionExceptionHandler;
+import com.opensymphony.xwork2.util.reflection.ReflectionException;
+import com.opensymphony.xwork2.util.logging.Logger;
+import com.opensymphony.xwork2.util.logging.LoggerFactory;
 import com.opensymphony.xwork2.config.entities.ResultConfig;
 import com.opensymphony.xwork2.inject.Inject;
 
@@ -126,11 +130,13 @@
  * 
  * @see ActionMapper
  */
-public class PortletActionRedirectResult extends PortletResult {
+public class PortletActionRedirectResult extends PortletResult implements ReflectionExceptionHandler
{
 
 	private static final long serialVersionUID = -7627388936683562557L;
 
-	/** The default parameter */
+    private static final Logger LOG = LoggerFactory.getLogger(PortletActionRedirectResult.class);
+
+    /** The default parameter */
 	public static final String DEFAULT_PARAM = "actionName";
 
 	protected String actionName;
@@ -256,4 +262,8 @@
 		return this;
 	}
 
+    public void handle(ReflectionException ex) {
+        // Only log as debug as they are probably parameters to be appended to the url
+        LOG.debug(ex.getMessage(), ex);
+    }
 }



Mime
View raw message