You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2013/03/22 10:37:52 UTC

svn commit: r1459687 - in /struts/struts2/trunk: core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java

Author: lukaszlenart
Date: Fri Mar 22 09:37:51 2013
New Revision: 1459687

URL: http://svn.apache.org/r1459687
Log:
WW-3964 Adds DEFAULT_PARAM to reduce noise in the logs

Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java?rev=1459687&r1=1459686&r2=1459687&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/HttpHeaderResult.java Fri Mar 22 09:37:51 2013
@@ -82,6 +82,11 @@ public class HttpHeaderResult implements
     private static final long serialVersionUID = 195648957144219214L;
     private static final Logger LOG = LoggerFactory.getLogger(HttpHeaderResult.class);
 
+    /**
+     * This result type doesn't have a default param, null is ok to reduce noice in logs
+     */
+    public static final String DEFAULT_PARAM = null;
+
     private boolean parse = true;
     private Map<String, String> headers;
     private int status = -1;

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java?rev=1459687&r1=1459686&r2=1459687&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java Fri Mar 22 09:37:51 2013
@@ -567,10 +567,9 @@ public class XmlConfigurationProvider im
                 String paramName = null;
                 try {
                     paramName = (String) clazz.getField("DEFAULT_PARAM").get(null);
-                }
-                catch (Throwable t) {
+                } catch (Throwable t) {
                     if (LOG.isDebugEnabled()) {
-                        LOG.debug("The result type #0 doesn't have a default param [DEFAULT_PARAM] defined", t, className);
+                        LOG.debug("The result type [#0] doesn't have a default param [DEFAULT_PARAM] defined!", t, className);
                     }
                 }
                 ResultTypeConfig.Builder resultType = new ResultTypeConfig.Builder(name, className).defaultResultParam(paramName)