You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by jo...@apache.org on 2011/05/03 19:53:58 UTC

svn commit: r1099157 [1/2] - in /struts/struts2/trunk: core/src/main/java/org/apache/struts2/components/ core/src/main/java/org/apache/struts2/components/template/ core/src/main/java/org/apache/struts2/config/ core/src/main/java/org/apache/struts2/disp...

Author: jogep
Date: Tue May  3 17:53:55 2011
New Revision: 1099157

URL: http://svn.apache.org/viewvc?rev=1099157&view=rev
Log:
WW-3619: Check LogLevel for all debug, info and warning messages

Modified:
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ActionComponent.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/AppendIterator.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/File.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Include.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/InputTransferSelect.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/MergeIterator.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Property.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UpDownSelect.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/BaseTemplateEngine.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/BeanSelectionProvider.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/LegacyPropertiesConfigurationProvider.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/PlainTextResult.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StreamResult.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StrutsResultSupport.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ClearSessionInterceptor.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CookieInterceptor.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/JSONValidationInterceptor.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/IteratorGenerator.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/SubsetIteratorFilter.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TokenHelper.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/util/UrlHelper.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java
    struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java
    struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowValidatorAction.java
    struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
    struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java
    struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/JavaTemplateEngine.java
    struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONCleaner.java
    struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java
    struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/SerializationParams.java
    struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/smd/SMDGenerator.java
    struts/struts2/trunk/plugins/osgi/src/main/java/org/apache/struts2/osgi/FelixOsgiHost.java
    struts/struts2/trunk/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
    struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java
    struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java
    struts/struts2/trunk/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java
    struts/struts2/trunk/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusFilter.java
    struts/struts2/trunk/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusObjectFactory.java
    struts/struts2/trunk/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusUtils.java
    struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/context/PreparatorServlet.java
    struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/context/ServletContextHolderListener.java
    struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java
    struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletAwareInterceptor.java
    struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java
    struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java
    struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java
    struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/entities/FileBasedView.java
    struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java
    struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java
    struts/struts2/trunk/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesListener.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProvider.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/AliasInterceptor.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/LoggingInterceptor.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkCollectionPropertyAccessor.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringProxyableObjectFactory.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/interceptor/ActionAutowiringInterceptor.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/FileManager.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/ResolverUtil.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/profiling/UtilTimerStack.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFileParser.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/ValidationInterceptor.java
    struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RepopulateConversionErrorFieldValidatorSupport.java

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ActionComponent.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ActionComponent.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ActionComponent.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ActionComponent.java Tue May  3 17:53:55 2011
@@ -167,7 +167,9 @@ public class ActionComponent extends Con
                 try {
                     writer.flush();
                 } catch (IOException e) {
-                    LOG.warn("error while trying to flush writer ", e);
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("error while trying to flush writer ", e);
+                    }
                 }
             }
             executeAction();

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/AppendIterator.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/AppendIterator.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/AppendIterator.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/AppendIterator.java Tue May  3 17:53:55 2011
@@ -141,7 +141,9 @@ public class AppendIterator extends Cont
 
             Object iteratorEntryObj = paramEntries.next();
             if (! MakeIterator.isIterable(iteratorEntryObj)) {
-                LOG.warn("param with value resolved as "+iteratorEntryObj+" cannot be make as iterator, it will be ignored and hence will not appear in the merged iterator");
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("param with value resolved as "+iteratorEntryObj+" cannot be make as iterator, it will be ignored and hence will not appear in the merged iterator");
+                }
                 continue;
             }
             appendIteratorFilter.setSource(MakeIterator.convert(iteratorEntryObj));

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/File.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/File.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/File.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/File.java Tue May  3 17:53:55 2011
@@ -75,13 +75,17 @@ public class File extends UIBean {
             String encType = (String) form.getParameters().get("enctype");
             if (!"multipart/form-data".equals(encType)) {
                 // uh oh, this isn't good! Let's warn the developer
-                LOG.warn("Struts has detected a file upload UI tag (s:file) being used without a form set to enctype 'multipart/form-data'. This is probably an error!");
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("Struts has detected a file upload UI tag (s:file) being used without a form set to enctype 'multipart/form-data'. This is probably an error!");
+                }
             }
 
             String method = (String) form.getParameters().get("method");
             if (!"post".equalsIgnoreCase(method)) {
                 // uh oh, this isn't good! Let's warn the developer
-                LOG.warn("Struts has detected a file upload UI tag (s:file) being used without a form set to method 'POST'. This is probably an error!");
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("Struts has detected a file upload UI tag (s:file) being used without a form set to method 'POST'. This is probably an error!");
+                }
             }
         }
 

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Include.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Include.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Include.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Include.java Tue May  3 17:53:55 2011
@@ -150,7 +150,9 @@ public class Include extends Component {
                     try {
                         urlBuf.append(URLEncoder.encode(values.get(i).toString(), "UTF-8"));
                     } catch (Exception e) {
-                        LOG.warn("unable to url-encode "+values.get(i).toString()+", it will be ignored");
+                        if (LOG.isWarnEnabled()) {
+                            LOG.warn("unable to url-encode "+values.get(i).toString()+", it will be ignored");
+                        }
                     }
 
                     concat = "&";
@@ -164,7 +166,9 @@ public class Include extends Component {
         try {
             include(result, writer, req, res, defaultEncoding);
         } catch (Exception e) {
-            LOG.warn("Exception thrown during include of " + result, e);
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Exception thrown during include of " + result, e);
+            }
         }
 
         return super.end(writer, body);

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/InputTransferSelect.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/InputTransferSelect.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/InputTransferSelect.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/InputTransferSelect.java Tue May  3 17:53:55 2011
@@ -201,7 +201,9 @@ public class InputTransferSelect extends
 
         }
         else {
-            LOG.warn("form enclosing inputtransferselect "+this+" not found, auto select upon form submit of inputtransferselect will not work");
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("form enclosing inputtransferselect "+this+" not found, auto select upon form submit of inputtransferselect will not work");
+            }
         }
     }
 

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/MergeIterator.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/MergeIterator.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/MergeIterator.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/MergeIterator.java Tue May  3 17:53:55 2011
@@ -155,7 +155,9 @@ public class MergeIterator extends Conte
         for (Iterator parametersIterator = _parameters.iterator(); parametersIterator.hasNext(); ) {
             Object iteratorEntryObj = parametersIterator.next();
             if (! MakeIterator.isIterable(iteratorEntryObj)) {
-                LOG.warn("param with value resolved as "+iteratorEntryObj+" cannot be make as iterator, it will be ignored and hence will not appear in the merged iterator");
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("param with value resolved as "+iteratorEntryObj+" cannot be make as iterator, it will be ignored and hence will not appear in the merged iterator");
+                }
                 continue;
             }
             mergeIteratorFilter.setSource(MakeIterator.convert(iteratorEntryObj));

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/OptionTransferSelect.java Tue May  3 17:53:55 2011
@@ -332,7 +332,9 @@ public class OptionTransferSelect extend
 
         }
         else {
-            LOG.warn("form enclosing optiontransferselect "+this+" not found, auto select upon form submit of optiontransferselect will not work");
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("form enclosing optiontransferselect "+this+" not found, auto select upon form submit of optiontransferselect will not work");
+            }
         }
     }
 

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Property.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Property.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Property.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/Property.java Tue May  3 17:53:55 2011
@@ -165,7 +165,9 @@ public class Property extends Component 
                 writer.write(prepare(defaultValue));
             }
         } catch (IOException e) {
-            LOG.info("Could not print out value '" + value + "'", e);
+            if (LOG.isInfoEnabled()) {
+        	LOG.info("Could not print out value '" + value + "'", e);
+            }
         }
 
         return result;

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/ServletUrlRenderer.java Tue May  3 17:53:55 2011
@@ -182,7 +182,7 @@ public class ServletUrlRenderer implemen
 
             // Warn user that the specified namespace/action combo
             // was not found in the configuration.
-            if (namespace != null) {
+            if (namespace != null && LOG.isWarnEnabled()) {
               LOG.warn("No configuration found for the specified action: '" + actionName + "' in namespace: '" + namespace + "'. Form action defaulting to 'action' attribute's literal value.");
             }
 
@@ -246,10 +246,14 @@ public class ServletUrlRenderer implemen
                 includeGetParameters(urlComponent);
                 includeExtraParameters(urlComponent);
             } else if (includeParams != null) {
-                LOG.warn("Unknown value for includeParams parameter to URL tag: " + includeParams);
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("Unknown value for includeParams parameter to URL tag: " + includeParams);
+                }
             }
         } catch (Exception e) {
-            LOG.warn("Unable to put request parameters (" + urlComponent.getHttpServletRequest().getQueryString() + ") into parameter map.", e);
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Unable to put request parameters (" + urlComponent.getHttpServletRequest().getQueryString() + ") into parameter map.", e);
+            }
         }
 
 		

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UIBean.java Tue May  3 17:53:55 2011
@@ -817,7 +817,9 @@ public abstract class UIBean extends Com
                 }
             }
             else {
-                LOG.warn("No ancestor Form found, javascript based tooltip will not work, however standard HTML tooltip using alt and title attribute will still work ");
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("No ancestor Form found, javascript based tooltip will not work, however standard HTML tooltip using alt and title attribute will still work ");
+                }
             }
 
             //TODO: this is to keep backward compatibility, remove once when tooltipConfig is dropped
@@ -902,7 +904,9 @@ public abstract class UIBean extends Com
         if (form != null) {
             form.addParameter("customOnsubmitEnabled", Boolean.TRUE);
         } else {
-            LOG.warn("Cannot find an Ancestor form, custom onsubmit is NOT enabled");
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Cannot find an Ancestor form, custom onsubmit is NOT enabled");
+            }
         }
     }
 
@@ -932,7 +936,9 @@ public abstract class UIBean extends Com
                     tooltipConfig.put(key, value);
                 }
                 else {
-                    LOG.warn("component "+component+" tooltip config param "+key+" has no value defined, skipped");
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("component "+component+" tooltip config param "+key+" has no value defined, skipped");
+                    }
                 }
             }
         }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UpDownSelect.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UpDownSelect.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UpDownSelect.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/UpDownSelect.java Tue May  3 17:53:55 2011
@@ -156,7 +156,9 @@ public class UpDownSelect extends Select
             ancestorForm.getParameters().put("updownselectIds", m);
         }
         else {
-            LOG.warn("no ancestor form found for updownselect "+this+", therefore autoselect of all elements upon form submission will not work ");
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("no ancestor form found for updownselect "+this+", therefore autoselect of all elements upon form submission will not work ");
+            }
         }
     }
 

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/BaseTemplateEngine.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/BaseTemplateEngine.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/BaseTemplateEngine.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/components/template/BaseTemplateEngine.java Tue May  3 17:53:55 2011
@@ -102,7 +102,9 @@ public abstract class BaseTemplateEngine
         try {
             is.close();
         } catch (IOException io) {
-            LOG.warn("Unable to close input stream", io);
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Unable to close input stream", io);
+            }
         }
     }
 
@@ -122,7 +124,9 @@ public abstract class BaseTemplateEngine
         try {
             return createFileInputStream(propFile);
         } catch (FileNotFoundException e) {
-            LOG.warn("Unable to find file in filesystem [" + propFile.getAbsolutePath() + "]");
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Unable to find file in filesystem [" + propFile.getAbsolutePath() + "]");
+            }
             return null;
         }
     }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/BeanSelectionProvider.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/BeanSelectionProvider.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/BeanSelectionProvider.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/BeanSelectionProvider.java Tue May  3 17:53:55 2011
@@ -251,7 +251,9 @@ public class BeanSelectionProvider imple
             while (customBundles.hasMoreTokens()) {
                 String name = customBundles.nextToken();
                 try {
-                    LOG.info("Loading global messages from " + name);
+                    if (LOG.isInfoEnabled()) {
+                	LOG.info("Loading global messages from " + name);
+                    }
                     LocalizedTextUtil.addDefaultResourceBundle(name);
                 } catch (Exception e) {
                     LOG.error("Could not find messages file " + name + ".properties. Skipping");
@@ -268,7 +270,7 @@ public class BeanSelectionProvider imple
         if (!builder.contains(type)) {
             String foundName = props.getProperty(key, DEFAULT_BEAN_NAME);
             if (builder.contains(type, foundName)) {
-                if (LOG.isDebugEnabled()) {
+                if (LOG.isInfoEnabled()) {
                     LOG.info("Choosing bean ("+foundName+") for "+type);
                 }
                 builder.alias(type, foundName, Container.DEFAULT_NAME);
@@ -296,7 +298,9 @@ public class BeanSelectionProvider imple
                 }
             }
         } else {
-            LOG.warn("Unable to alias bean type "+type+", default mapping already assigned.");
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Unable to alias bean type "+type+", default mapping already assigned.");
+            }
         }
     }
 

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/LegacyPropertiesConfigurationProvider.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/LegacyPropertiesConfigurationProvider.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/LegacyPropertiesConfigurationProvider.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/LegacyPropertiesConfigurationProvider.java Tue May  3 17:53:55 2011
@@ -89,7 +89,9 @@ public class LegacyPropertiesConfigurati
                         }
                         locale = new Locale(lang, country);
                     } else {
-                        LOG.info("No locale define, substituting the default VM locale");
+                        if (LOG.isInfoEnabled()) {
+                            LOG.info("No locale define, substituting the default VM locale");
+                        }
                         locale = Locale.getDefault();
                     }
                 }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/PropertiesSettings.java Tue May  3 17:53:55 2011
@@ -57,7 +57,9 @@ class PropertiesSettings extends Setting
         URL settingsUrl = ClassLoaderUtils.getResource(name + ".properties", getClass());
         
         if (settingsUrl == null) {
-            LOG.debug(name + ".properties missing");
+            if (LOG.isDebugEnabled()) {
+        	LOG.debug(name + ".properties missing");
+            }
             settings = new LocatableProperties();
             return;
         }
@@ -76,7 +78,9 @@ class PropertiesSettings extends Setting
                 try {
                     in.close();
                 } catch(IOException io) {
-                    LOG.warn("Unable to close input stream", io);
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("Unable to close input stream", io);
+                    }
                 }
             }
         }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java Tue May  3 17:53:55 2011
@@ -258,7 +258,9 @@ public class Dispatcher {
     	// clean up ObjectFactory
         ObjectFactory objectFactory = getContainer().getInstance(ObjectFactory.class);
         if (objectFactory == null) {
-            LOG.warn("Object Factory is null, something is seriously wrong, no clean up will be performed");
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Object Factory is null, something is seriously wrong, no clean up will be performed");
+            }
         }
         if (objectFactory instanceof ObjectFactoryDestroyable) {
             try {
@@ -395,7 +397,9 @@ public class Dispatcher {
         // test whether param-access workaround needs to be enabled
         if (servletContext != null && servletContext.getServerInfo() != null
                 && servletContext.getServerInfo().indexOf("WebLogic") >= 0) {
-            LOG.info("WebLogic server detected. Enabling Struts parameter access work-around.");
+            if (LOG.isInfoEnabled()) {
+        	LOG.info("WebLogic server detected. Enabling Struts parameter access work-around.");
+            }
             paramsWorkaroundEnabled = true;
         } else {
             paramsWorkaroundEnabled = "true".equals(container.getInstance(String.class,
@@ -512,7 +516,9 @@ public class Dispatcher {
                 LOG.error("Could not find action or result\n" + reqStr, e);
             }
         	else {
+                    if (LOG.isWarnEnabled()) {
         		LOG.warn("Could not find action or result", e);
+                    }
         	}
             sendError(request, response, context, HttpServletResponse.SC_NOT_FOUND, e);
         } catch (Exception e) {
@@ -616,7 +622,9 @@ public class Dispatcher {
 
         if (saveDir.equals("")) {
             File tempdir = (File) servletContext.getAttribute("javax.servlet.context.tempdir");
-            LOG.info("Unable to find 'struts.multipart.saveDir' property setting. Defaulting to javax.servlet.context.tempdir");
+            if (LOG.isInfoEnabled()) {
+        	LOG.info("Unable to find 'struts.multipart.saveDir' property setting. Defaulting to javax.servlet.context.tempdir");
+            }
 
             if (tempdir != null) {
                 saveDir = tempdir.toString();
@@ -637,7 +645,9 @@ public class Dispatcher {
                         LOG.error(logMessage);
         	    }
         	    else {
-                        LOG.warn(logMessage);
+                        if (LOG.isWarnEnabled()) {
+                            LOG.warn(logMessage);
+                        }
         	    }
                 }
             }
@@ -754,7 +764,9 @@ public class Dispatcher {
 
                 if ((currentFile != null) && currentFile.isFile()) {
                     if (!currentFile.delete()) {
-                        LOG.warn("Resource Leaking:  Could not remove uploaded file '" + currentFile.getCanonicalPath() + "'.");
+                        if (LOG.isWarnEnabled()) {
+                            LOG.warn("Resource Leaking:  Could not remove uploaded file '" + currentFile.getCanonicalPath() + "'.");
+                        }
                     }
                 }
             }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/PlainTextResult.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/PlainTextResult.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/PlainTextResult.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/PlainTextResult.java Tue May  3 17:53:55 2011
@@ -120,7 +120,9 @@ public class PlainTextResult extends Str
                 charset = Charset.forName(charSet);
             }
             else {
-                LOG.warn("charset ["+charSet+"] is not recognized ");
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("charset ["+charSet+"] is not recognized ");
+                }
                 charset = null;
             }
         }
@@ -148,7 +150,9 @@ public class PlainTextResult extends Str
                 reader = new InputStreamReader(resourceAsStream);
             }
             if (resourceAsStream == null) {
-            	LOG.warn("resource at location ["+finalLocation+"] cannot be obtained (return null) from ServletContext !!! ");
+                if (LOG.isWarnEnabled()) {
+            		LOG.warn("resource at location ["+finalLocation+"] cannot be obtained (return null) from ServletContext !!! ");
+                }
             } else {
                 char[] buffer = new char[BUFFER_SIZE];
                 int charRead;

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StreamResult.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StreamResult.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StreamResult.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StreamResult.java Tue May  3 17:53:55 2011
@@ -259,7 +259,9 @@ public class StreamResult extends Struts
                     }
                 }
                 catch(NumberFormatException e) {
-                    LOG.warn("failed to recongnize "+_contentLength+" as a number, contentLength header will not be set", e);
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("failed to recongnize "+_contentLength+" as a number, contentLength header will not be set", e);
+                    }
                 }
             }
 
@@ -283,14 +285,18 @@ public class StreamResult extends Struts
             }
 
             // Copy input to output
-            LOG.debug("Streaming to output buffer +++ START +++");
+            if (LOG.isDebugEnabled()) {
+        	LOG.debug("Streaming to output buffer +++ START +++");
+            }
             byte[] oBuff = new byte[bufferSize];
             int iSize;
             while (-1 != (iSize = inputStream.read(oBuff))) {
                 oOutput.write(oBuff, 0, iSize);
             }
-            LOG.debug("Streaming to output buffer +++ END +++");
-
+            if (LOG.isDebugEnabled()) {
+        	LOG.debug("Streaming to output buffer +++ END +++");
+            }
+            
             // Flush
             oOutput.flush();
         }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StrutsResultSupport.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StrutsResultSupport.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StrutsResultSupport.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/StrutsResultSupport.java Tue May  3 17:53:55 2011
@@ -206,7 +206,9 @@ public abstract class StrutsResultSuppor
                                         return URLEncoder.encode(parsedValue.toString(), "UTF-8");
                                     }
                                     catch(UnsupportedEncodingException e) {
-                                        LOG.warn("error while trying to encode ["+parsedValue+"]", e);
+                                        if (LOG.isWarnEnabled()) {
+                                            LOG.warn("error while trying to encode ["+parsedValue+"]", e);
+                                        }
                                     }
                                 }
                             }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java Tue May  3 17:53:55 2011
@@ -210,7 +210,9 @@ public class Restful2ActionMapper extend
                         mapping.getParams().putAll(parameters);
                     }
                 } catch (Exception e) {
-                    LOG.warn("Unable to determine parameters from the url", e);
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("Unable to determine parameters from the url", e);
+                    }
                 }
                 mapping.setName(actionName.substring(actionSlashPos+1));
             }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java Tue May  3 17:53:55 2011
@@ -106,7 +106,9 @@ public class RestfulActionMapper impleme
                 }
             }
         } catch (Exception e) {
-            LOG.warn("Cannot determine url parameters", e);
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Cannot determine url parameters", e);
+            }
         }
 
         return new ActionMapping(actionName, "", "", parameters);

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java Tue May  3 17:53:55 2011
@@ -79,7 +79,9 @@ public class JakartaMultiPartRequest imp
         try {
             processUpload(request, saveDir);
         } catch (FileUploadException e) {
-            LOG.warn("Unable to parse request", e);
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Unable to parse request", e);
+            }
             errors.add(e.getMessage());
         }
     }
@@ -98,7 +100,9 @@ public class JakartaMultiPartRequest imp
     }
 
     private void processFileField(FileItem item) {
-        LOG.debug("Item is a file upload");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Item is a file upload");
+        }
 
         // Skip file uploads that don't have a file name - meaning that no file was selected.
         if (item.getName() == null || item.getName().trim().length() < 1) {
@@ -118,7 +122,9 @@ public class JakartaMultiPartRequest imp
     }
 
     private void processNormalFormField(FileItem item, String charset) throws UnsupportedEncodingException {
-        LOG.debug("Item is a normal form field");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Item is a normal form field");
+        }
         List<String> values;
         if (params.get(item.getFieldName()) != null) {
             values = params.get(item.getFieldName());

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java Tue May  3 17:53:55 2011
@@ -77,7 +77,9 @@ public class CheckboxInterceptor impleme
                 Object values = entry.getValue();
                 iterator.remove();
                 if (values != null && values instanceof String[] && ((String[])values).length > 1) {
-                    LOG.debug("Bypassing automatic checkbox detection due to multiple checkboxes of the same name: #1", name);
+                    if (LOG.isDebugEnabled()) {
+                	LOG.debug("Bypassing automatic checkbox detection due to multiple checkboxes of the same name: #1", name);
+                    }
                     continue;
                 }
 

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ClearSessionInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ClearSessionInterceptor.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ClearSessionInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ClearSessionInterceptor.java Tue May  3 17:53:55 2011
@@ -83,7 +83,10 @@ public class ClearSessionInterceptor ext
      * @see com.opensymphony.xwork2.interceptor.Interceptor#intercept(com.opensymphony.xwork2.ActionInvocation)
      */
     public String intercept(ActionInvocation invocation) throws Exception {
-        LOG.debug("Clearing HttpSession");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Clearing HttpSession");
+        }
+        
         ActionContext ac = invocation.getInvocationContext();
         Map session = ac.getSession();
  

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CookieInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CookieInterceptor.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CookieInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CookieInterceptor.java Tue May  3 17:53:55 2011
@@ -188,9 +188,10 @@ public class CookieInterceptor extends A
     }
 
     public String intercept(ActionInvocation invocation) throws Exception {
-        if (LOG.isDebugEnabled())
+        if (LOG.isDebugEnabled()) {
             LOG.debug("start interception");
-
+        }
+        
         // contains selected cookies
         final Map<String, String> cookiesMap = new LinkedHashMap<String, String>();
 
@@ -203,8 +204,9 @@ public class CookieInterceptor extends A
                 String value = cookie.getValue();
 
                 if (cookiesNameSet.contains("*")) {
-                    if (LOG.isDebugEnabled())
+                    if (LOG.isDebugEnabled()) {
                         LOG.debug("contains cookie name [*] in configured cookies name set, cookie with name [" + name + "] with value [" + value + "] will be injected");
+                    }
                     populateCookieValueIntoStack(name, value, cookiesMap, stack);
                 } else if (cookiesNameSet.contains(cookie.getName())) {
                     populateCookieValueIntoStack(name, value, cookiesMap, stack);
@@ -246,8 +248,10 @@ public class CookieInterceptor extends A
             // if cookiesValues is specified, the cookie's value must match before we
             // inject them into Struts' action
             if (cookiesValueSet.contains(cookieValue)) {
-                if (LOG.isDebugEnabled())
+                if (LOG.isDebugEnabled()) {
                     LOG.debug("both configured cookie name and value matched, cookie ["+cookieName+"] with value ["+cookieValue+"] will be injected");
+                }
+                
                 cookiesMap.put(cookieName, cookieValue);
                 stack.setValue(cookieName, cookieValue);
             }
@@ -263,8 +267,9 @@ public class CookieInterceptor extends A
      */
     protected void injectIntoCookiesAwareAction(Object action, Map<String, String> cookiesMap) {
         if (action instanceof CookiesAware) {
-            if (LOG.isDebugEnabled())
+            if (LOG.isDebugEnabled()) {
                 LOG.debug("action ["+action+"] implements CookiesAware, injecting cookies map ["+cookiesMap+"]");
+            }
             ((CookiesAware)action).setCookiesMap(cookiesMap);
         }
     }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java Tue May  3 17:53:55 2011
@@ -88,7 +88,10 @@ public class CreateSessionInterceptor ex
      * @see com.opensymphony.xwork2.interceptor.Interceptor#intercept(com.opensymphony.xwork2.ActionInvocation)
      */
     public String intercept(ActionInvocation invocation) throws Exception {
-        LOG.debug("Creating HttpSession");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Creating HttpSession");
+        }
+        
         ServletActionContext.getRequest().getSession(true);
         return invocation.invoke();
     }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java Tue May  3 17:53:55 2011
@@ -263,10 +263,12 @@ public class ExecuteAndWaitInterceptor e
 
                 Map results = proxy.getConfig().getResults();
                 if (!results.containsKey(WAIT)) {
-                    LOG.warn("ExecuteAndWait interceptor has detected that no result named 'wait' is available. " +
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("ExecuteAndWait interceptor has detected that no result named 'wait' is available. " +
                             "Defaulting to a plain built-in wait page. It is highly recommend you " +
                             "provide an action-specific or global result named '" + WAIT +
                             "'.");
+                    }
                     // no wait result? hmm -- let's try to do dynamically put it in for you!
 
                     //we used to add a fake "wait" result here, since the configuration is unmodifiable, that is no longer

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java Tue May  3 17:53:55 2011
@@ -259,7 +259,9 @@ public class FileUploadInterceptor exten
                     validation.addActionError(error);
                 }
 
-                LOG.warn(error);
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn(error);
+                }
             }
         }
 
@@ -303,10 +305,14 @@ public class FileUploadInterceptor exten
                         }
                     }
                 } else {
-                    LOG.warn(getTextMessage(action, "struts.messages.invalid.file", new Object[]{inputName}, ac.getLocale()));
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn(getTextMessage(action, "struts.messages.invalid.file", new Object[]{inputName}, ac.getLocale()));
+                    }
                 }
             } else {
-                LOG.warn(getTextMessage(action, "struts.messages.invalid.content.type", new Object[]{inputName}, ac.getLocale()));
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn(getTextMessage(action, "struts.messages.invalid.content.type", new Object[]{inputName}, ac.getLocale()));
+                }
             }
         }
 
@@ -336,28 +342,36 @@ public class FileUploadInterceptor exten
                 validation.addFieldError(inputName, errMsg);
             }
 
-            LOG.warn(errMsg);
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn(errMsg);
+            }
         } else if (maximumSize != null && maximumSize < file.length()) {
             String errMsg = getTextMessage(action, "struts.messages.error.file.too.large", new Object[]{inputName, filename, file.getName(), "" + file.length()}, locale);
             if (validation != null) {
                 validation.addFieldError(inputName, errMsg);
             }
 
-            LOG.warn(errMsg);
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn(errMsg);
+            }
         } else if ((!allowedTypesSet.isEmpty()) && (!containsItem(allowedTypesSet, contentType))) {
             String errMsg = getTextMessage(action, "struts.messages.error.content.type.not.allowed", new Object[]{inputName, filename, file.getName(), contentType}, locale);
             if (validation != null) {
                 validation.addFieldError(inputName, errMsg);
             }
 
-            LOG.warn(errMsg);
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn(errMsg);
+            }
         } else if ((!allowedExtensionsSet.isEmpty()) && (!hasAllowedExtension(allowedExtensionsSet, filename))) {
             String errMsg = getTextMessage(action, "struts.messages.error.file.extension.not.allowed", new Object[]{inputName, filename, file.getName(), contentType}, locale);
             if (validation != null) {
                 validation.addFieldError(inputName, errMsg);
             }
 
-            LOG.warn(errMsg);
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn(errMsg);
+            }
         } else {
             fileIsAcceptable = true;
         }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/MessageStoreInterceptor.java Tue May  3 17:53:55 2011
@@ -198,13 +198,18 @@ public class MessageStoreInterceptor imp
     }
 
     public String intercept(ActionInvocation invocation) throws Exception {
-        LOG.debug("entering MessageStoreInterceptor ...");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("entering MessageStoreInterceptor ...");
+        }
 
         before(invocation);
         String result = invocation.invoke();
         after(invocation, result);
 
-        LOG.debug("exit executing MessageStoreInterceptor");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("exit executing MessageStoreInterceptor");
+        }
+        
         return result;
     }
 
@@ -228,7 +233,9 @@ public class MessageStoreInterceptor imp
                 Map session = (Map) invocation.getInvocationContext().get(ActionContext.SESSION);
                 ValidationAware validationAwareAction = (ValidationAware) action;
 
-                LOG.debug("retrieve error / message from session to populate into action ["+action+"]");
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("retrieve error / message from session to populate into action ["+action+"]");
+                }
 
                 Collection actionErrors = (Collection) session.get(actionErrorsSessionKey);
                 Collection actionMessages = (Collection) session.get(actionMessagesSessionKey);
@@ -276,15 +283,17 @@ public class MessageStoreInterceptor imp
                 // store error / messages into session
                 Map session = (Map) invocation.getInvocationContext().get(ActionContext.SESSION);
 
-                LOG.debug("store action ["+action+"] error/messages into session ");
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("store action ["+action+"] error/messages into session ");
+                }
 
                 ValidationAware validationAwareAction = (ValidationAware) action;
                 session.put(actionErrorsSessionKey, validationAwareAction.getActionErrors());
                 session.put(actionMessagesSessionKey, validationAwareAction.getActionMessages());
                 session.put(fieldErrorsSessionKey, validationAwareAction.getFieldErrors());
             }
-            else {
-                LOG.debug("Action ["+action+"] is not ValidationAware, no message / error that are storeable");
+            else if(LOG.isDebugEnabled()) {
+        	LOG.debug("Action ["+action+"] is not ValidationAware, no message / error that are storeable");
             }
         }
     }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/JSONValidationInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/JSONValidationInterceptor.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/JSONValidationInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/validation/JSONValidationInterceptor.java Tue May  3 17:53:55 2011
@@ -118,7 +118,9 @@ public class JSONValidationInterceptor e
 
     private void setupEncoding(HttpServletResponse response, HttpServletRequest request) {
         if (isSetEncoding(request)) {
-            LOG.debug("Default encoding not set!");
+            if (LOG.isDebugEnabled()) {
+        	LOG.debug("Default encoding not set!");
+            }
         } else {
             if (LOG.isDebugEnabled()) {
                 LOG.debug("Setting up encoding to: [" + DEFAULT_ENCODING + "]!");

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/IteratorGenerator.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/IteratorGenerator.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/IteratorGenerator.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/IteratorGenerator.java Tue May  3 17:53:55 2011
@@ -93,7 +93,9 @@ public class IteratorGenerator implement
                             values.add(convertedObj);
                         }
                         catch(Exception e) { // make sure things, goes on, we just ignore the bad ones
-                            LOG.warn("unable to convert ["+token+"], skipping this token, it will not appear in the generated iterator", e);
+                            if (LOG.isWarnEnabled()) {
+                        	LOG.warn("unable to convert ["+token+"], skipping this token, it will not appear in the generated iterator", e);
+                            }
                         }
                     }
                     else {

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/SubsetIteratorFilter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/SubsetIteratorFilter.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/SubsetIteratorFilter.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/SubsetIteratorFilter.java Tue May  3 17:53:55 2011
@@ -167,7 +167,9 @@ public class SubsetIteratorFilter extend
                 return okToAdd;
             }
             catch(Exception e) {
-                LOG.warn("decider ["+decider+"] encountered an error while decide adding element ["+element+"], element will be ignored, it will not appeared in subseted iterator", e);
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("decider ["+decider+"] encountered an error while decide adding element ["+element+"], element will be ignored, it will not appeared in subseted iterator", e);
+                }
                 return false;
             }
         }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TextProviderHelper.java Tue May  3 17:53:55 2011
@@ -94,14 +94,22 @@ public class TextProviderHelper {
 
             if (LOG.isWarnEnabled()) {
                 if (tp != null) {
-                    LOG.warn("The first TextProvider in the ValueStack ("+tp.getClass().getName()+") could not locate the message resource with key '"+key+"'");
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("The first TextProvider in the ValueStack ("+tp.getClass().getName()+") could not locate the message resource with key '"+key+"'");
+                    }
                 } else {
-                    LOG.warn("Could not locate the message resource '"+key+"' as there is no TextProvider in the ValueStack.");
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("Could not locate the message resource '"+key+"' as there is no TextProvider in the ValueStack.");
+                    }
                 }
                 if (msg.equals(defaultMessage)) {
-                    LOG.warn("The default value expression '"+defaultMessage+"' was evaluated and did not match a property.  The literal value '"+defaultMessage+"' will be used.");
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("The default value expression '"+defaultMessage+"' was evaluated and did not match a property.  The literal value '"+defaultMessage+"' will be used.");
+                    }
                 } else {
-                    LOG.warn("The default value expression '"+defaultMessage+"' evaluated to '"+msg+"'");
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("The default value expression '"+defaultMessage+"' evaluated to '"+msg+"'");
+                    }
                 }
             }
         }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TokenHelper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TokenHelper.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TokenHelper.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/util/TokenHelper.java Tue May  3 17:53:55 2011
@@ -105,7 +105,9 @@ public class TokenHelper {
         String token;
 
         if ((tokens == null) || (tokens.length < 1)) {
-            LOG.warn("Could not find token mapped to token name " + tokenName);
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Could not find token mapped to token name " + tokenName);
+            }
 
             return null;
         }
@@ -124,7 +126,9 @@ public class TokenHelper {
         Map params = ActionContext.getContext().getParameters();
 
         if (!params.containsKey(TOKEN_NAME_FIELD)) {
-            LOG.warn("Could not find token name in params.");
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Could not find token name in params.");
+            }
 
             return null;
         }
@@ -133,7 +137,9 @@ public class TokenHelper {
         String tokenName;
 
         if ((tokenNames == null) || (tokenNames.length < 1)) {
-            LOG.warn("Got a null or empty token name.");
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Got a null or empty token name.");
+            }
 
             return null;
         }
@@ -153,16 +159,18 @@ public class TokenHelper {
         String tokenName = getTokenName();
 
         if (tokenName == null) {
-            if (LOG.isDebugEnabled())
+            if (LOG.isDebugEnabled()) {
                 LOG.debug("no token name found -> Invalid token ");
+            }
             return false;
         }
 
         String token = getToken(tokenName);
 
         if (token == null) {
-            if (LOG.isDebugEnabled())
+            if (LOG.isDebugEnabled()) {
                 LOG.debug("no token found for token name "+tokenName+" -> Invalid token ");
+            }
             return false;
         }
 
@@ -170,9 +178,11 @@ public class TokenHelper {
         String sessionToken = (String) session.get(tokenName);
 
         if (!token.equals(sessionToken)) {
-            LOG.warn(LocalizedTextUtil.findText(TokenHelper.class, "struts.internal.invalid.token", ActionContext.getContext().getLocale(), "Form token {0} does not match the session token {1}.", new Object[]{
-                    token, sessionToken
-            }));
+            if (LOG.isWarnEnabled()) {
+                LOG.warn(LocalizedTextUtil.findText(TokenHelper.class, "struts.internal.invalid.token", ActionContext.getContext().getLocale(), "Form token {0} does not match the session token {1}.", new Object[]{
+                        token, sessionToken
+                }));
+            }
 
             return false;
         }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/FreemarkerManager.java Tue May  3 17:53:55 2011
@@ -450,7 +450,9 @@ public class FreemarkerManager {
                 try {
                     in.close();
                 } catch(IOException io) {
-                    LOG.warn("Unable to close input stream", io);
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("Unable to close input stream", io);
+                    }
                 }
             }
         }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/IteratorGeneratorTag.java Tue May  3 17:53:55 2011
@@ -206,7 +206,9 @@ public class IteratorGeneratorTag extend
                     count = Integer.parseInt((String)countObj);
                 }
                 catch(NumberFormatException e) {
-                    LOG.warn("unable to convert count attribute ["+countObj+"] to number, ignore count attribute", e);
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("unable to convert count attribute ["+countObj+"] to number, ignore count attribute", e);
+                    }
                 }
             }
         }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/jsp/iterator/SubsetIteratorTag.java Tue May  3 17:53:55 2011
@@ -223,7 +223,9 @@ public class SubsetIteratorTag extends S
                     count = Integer.parseInt((String)countObj);
                 }
                 catch(NumberFormatException e) {
-                    LOG.warn("unable to convert count attribute ["+countObj+"] to number, ignore count attribute", e);
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("unable to convert count attribute ["+countObj+"] to number, ignore count attribute", e);
+                    }
                 }
             }
         }
@@ -249,7 +251,9 @@ public class SubsetIteratorTag extends S
                     start = Integer.parseInt((String)startObj);
                 }
                 catch(NumberFormatException e) {
-                    LOG.warn("unable to convert count attribute ["+startObj+"] to number, ignore count attribute", e);
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("unable to convert count attribute ["+startObj+"] to number, ignore count attribute", e);
+                    }
                 }
             }
         }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/util/UrlHelper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/util/UrlHelper.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/util/UrlHelper.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/util/UrlHelper.java Tue May  3 17:53:55 2011
@@ -266,7 +266,9 @@ public class UrlHelper {
         try {
             return URLEncoder.encode(translatedInput, encoding);
         } catch (UnsupportedEncodingException e) {
-            LOG.warn("Could not encode URL parameter '" + input + "', returning value un-encoded");
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Could not encode URL parameter '" + input + "', returning value un-encoded");
+            }
             return translatedInput;
         }
     }
@@ -278,7 +280,9 @@ public class UrlHelper {
         try {
             return URLDecoder.decode(translatedInput, encoding);
         } catch (UnsupportedEncodingException e) {
-            LOG.warn("Could not encode URL parameter '" + input + "', returning value un-encoded");
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Could not encode URL parameter '" + input + "', returning value un-encoded");
+            }
             return translatedInput;
         }
     }

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/velocity/VelocityManager.java Tue May  3 17:53:55 2011
@@ -192,7 +192,9 @@ public class VelocityManager {
                 VelocityContext velocityContext = (VelocityContext) objectFactory.buildBean(className, null);
                 contextList.add(velocityContext);
             } catch (Exception e) {
-                LOG.warn("Warning.  " + e.getClass().getName() + " caught while attempting to instantiate a chained VelocityContext, " + className + " -- skipping");
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("Warning.  " + e.getClass().getName() + " caught while attempting to instantiate a chained VelocityContext, " + className + " -- skipping");
+                }
             }
         }
         if (contextList.size() > 0) {
@@ -299,11 +301,15 @@ public class VelocityManager {
 
             // if we've got something, load 'er up
             if (in != null) {
-                LOG.info("Initializing velocity using " + resourceLocation);
+                if (LOG.isInfoEnabled()) {
+                    LOG.info("Initializing velocity using " + resourceLocation);
+                }
                 properties.load(in);
             }
         } catch (IOException e) {
-            LOG.warn("Unable to load velocity configuration " + resourceLocation, e);
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Unable to load velocity configuration " + resourceLocation, e);
+            }
         } finally {
             if (in != null) {
                 try {

Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/xslt/XSLTResult.java Tue May  3 17:53:55 2011
@@ -358,7 +358,9 @@ public class XSLTResult implements Resul
 
                 public void warning(TransformerException exception)
                         throws TransformerException {
-                    LOG.warn(exception.getMessage(), exception);
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn(exception.getMessage(), exception);
+                    }
                 }
                 
             });
@@ -384,7 +386,9 @@ public class XSLTResult implements Resul
             Source xmlSource = getDOMSourceForStack(result);
 
             // Transform the source XML to System.out.
-            LOG.debug("xmlSource = " + xmlSource);
+            if (LOG.isDebugEnabled()) {
+        	LOG.debug("xmlSource = " + xmlSource);
+            }
             transformer.transform(xmlSource, new StreamResult(writer));
 
             writer.flush(); // ...and flush...
@@ -437,7 +441,9 @@ public class XSLTResult implements Resul
                     throw new TransformerException("Stylesheet " + path + " not found in resources.");
                 }
 
-                LOG.debug("Preparing XSLT stylesheet templates: " + path);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Preparing XSLT stylesheet templates: " + path);
+                }
 
                 TransformerFactory factory = TransformerFactory.newInstance();
                 factory.setURIResolver(getURIResolver());

Modified: struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowValidatorAction.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowValidatorAction.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowValidatorAction.java (original)
+++ struts/struts2/trunk/plugins/config-browser/src/main/java/org/apache/struts2/config_browser/ShowValidatorAction.java Tue May  3 17:53:55 2011
@@ -112,7 +112,9 @@ public class ShowValidatorAction extends
                 properties.add(new PropertyInfo(name, pd.getPropertyType(), value));
             }
         } catch (Exception e) {
-            LOG.warn("Unable to retrieve properties.", e);
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Unable to retrieve properties.", e);
+            }
             addActionError("Unable to retrieve properties: " + e.toString());
         }
 

Modified: struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java (original)
+++ struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/JasperReportsResult.java Tue May  3 17:53:55 2011
@@ -309,7 +309,9 @@ public class JasperReportsResult extends
         // Add any report parameters from action to param map.
         Map reportParams = (Map) stack.findValue(reportParameters);
         if (reportParams != null) {
-            LOG.debug("Found report parameters; adding to parameters...");
+            if (LOG.isDebugEnabled()) {
+        	LOG.debug("Found report parameters; adding to parameters...");
+            }
             parameters.putAll(reportParams);
         }
 
@@ -382,7 +384,9 @@ public class JasperReportsResult extends
 
             Map exportParams = (Map) stack.findValue(exportParameters);
             if (exportParams != null) {
-                LOG.debug("Found export parameters; adding to exporter parameters...");
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Found export parameters; adding to exporter parameters...");
+                }
                 exporter.getParameters().putAll(exportParams);
             }
 

Modified: struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java (original)
+++ struts/struts2/trunk/plugins/jasperreports/src/main/java/org/apache/struts2/views/jasperreports/ValueStackDataSource.java Tue May  3 17:53:55 2011
@@ -70,7 +70,9 @@ public class ValueStackDataSource implem
                 iterator = MakeIterator.convert(array);
             }
         } else {
-            LOG.warn("Data source value for data source " + dataSource + " was null");
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Data source value for data source " + dataSource + " was null");
+            }
         }
     }
 
@@ -128,11 +130,15 @@ public class ValueStackDataSource implem
 
         if ((iterator != null) && (iterator.hasNext())) {
             valueStack.push(iterator.next());
-            LOG.debug("Pushed next value: " + valueStack.findValue("."));
+            if (LOG.isDebugEnabled()) {
+        	LOG.debug("Pushed next value: " + valueStack.findValue("."));
+            }
 
             return true;
         } else {
-            LOG.debug("No more values");
+            if (LOG.isDebugEnabled()) {
+        	LOG.debug("No more values");
+            }
 
             return false;
         }

Modified: struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/JavaTemplateEngine.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/JavaTemplateEngine.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/JavaTemplateEngine.java (original)
+++ struts/struts2/trunk/plugins/javatemplates/src/main/java/org/apache/struts2/views/java/JavaTemplateEngine.java Tue May  3 17:53:55 2011
@@ -86,8 +86,9 @@ public class JavaTemplateEngine extends 
         while (customThemes.hasMoreTokens()) {
             String themeClass = customThemes.nextToken().trim();
             try {
-                LOG.info("Registering custom theme '" + themeClass + "' to javatemplates engine");
-
+                if (LOG.isInfoEnabled()) {
+                    LOG.info("Registering custom theme '" + themeClass + "' to javatemplates engine");
+                }
 
                 //FIXME: This means Themes must have no-arg constructor - should use object factory here
                 //ObjectFactory.getObjectFactory().buildBean(ClassLoaderUtil.loadClass(themeClass, getClass()), null);

Modified: struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONCleaner.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONCleaner.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONCleaner.java (original)
+++ struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONCleaner.java Tue May  3 17:53:55 2011
@@ -95,7 +95,9 @@ public abstract class JSONCleaner {
             if (allow(key)) {
                 e.setValue(clean(key, e.getValue()));
             } else {
-                LOG.debug("blocked: " + key);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("blocked: " + key);
+                }
                 iter.remove();
             }
         }

Modified: struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java (original)
+++ struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONWriter.java Tue May  3 17:53:55 2011
@@ -387,8 +387,10 @@ class JSONWriter {
             }
             hasData = true;
             if (!warnedNonString && !(key instanceof String)) {
-                LOG.warn("JavaScript doesn't support non-String keys, using toString() on "
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("JavaScript doesn't support non-String keys, using toString() on "
                         + key.getClass().getName());
+                }
                 warnedNonString = true;
             }
             this.value(key.toString(), method);

Modified: struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/SerializationParams.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/SerializationParams.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/SerializationParams.java (original)
+++ struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/SerializationParams.java Tue May  3 17:53:55 2011
@@ -20,10 +20,10 @@
  */
 package org.apache.struts2.json;
 
-import org.apache.commons.lang.StringUtils;
-
 import javax.servlet.http.HttpServletResponse;
 
+import org.apache.commons.lang.StringUtils;
+
 public class SerializationParams {
     private static final String DEFAULT_CONTENT_TYPE = "application/json";
 

Modified: struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/smd/SMDGenerator.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/smd/SMDGenerator.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/smd/SMDGenerator.java (original)
+++ struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/smd/SMDGenerator.java Tue May  3 17:53:55 2011
@@ -69,9 +69,8 @@ public class SMDGenerator {
             // find params for this method
             processMethodsParameters(method, smdMethod);
 
-        } else {
-            if (LOG.isDebugEnabled())
-                LOG.debug("Ignoring property " + method.getName());
+        } else if(LOG.isDebugEnabled()) {
+            LOG.debug("Ignoring property " + method.getName());
         }
     }
 

Modified: struts/struts2/trunk/plugins/osgi/src/main/java/org/apache/struts2/osgi/FelixOsgiHost.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/osgi/src/main/java/org/apache/struts2/osgi/FelixOsgiHost.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/osgi/src/main/java/org/apache/struts2/osgi/FelixOsgiHost.java (original)
+++ struts/struts2/trunk/plugins/osgi/src/main/java/org/apache/struts2/osgi/FelixOsgiHost.java Tue May  3 17:53:55 2011
@@ -228,8 +228,9 @@ public class FelixOsgiHost implements Os
                         //add all the bundles to the list
                         for (File bundle : bundles) {
                             String externalForm = bundle.toURI().toURL().toExternalForm();
-                            if (LOG.isDebugEnabled())
+                            if (LOG.isDebugEnabled()) {
                                 LOG.debug("Adding bundle [#0]", externalForm);
+                            }
                             bundleJars.add(externalForm);
                         }
 

Modified: struts/struts2/trunk/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java (original)
+++ struts/struts2/trunk/plugins/osgi/src/main/java/org/apache/struts2/osgi/OsgiConfigurationProvider.java Tue May  3 17:53:55 2011
@@ -107,8 +107,9 @@ public class OsgiConfigurationProvider i
      */
     protected void loadConfigFromBundle(Bundle bundle) {
         String bundleName = bundle.getSymbolicName();
-        if (LOG.isDebugEnabled())
+        if (LOG.isDebugEnabled()) {
             LOG.debug("Loading packages from bundle [#0]", bundleName);
+        }
 
         //init action context
         ActionContext ctx = ActionContext.getContext();
@@ -123,8 +124,9 @@ public class OsgiConfigurationProvider i
             ctx.put(ClassLoaderInterface.CLASS_LOADER_INTERFACE, new BundleClassLoaderInterface());
             ctx.put(BundleAccessor.CURRENT_BUNDLE_NAME, bundleName);
 
-            if (LOG.isTraceEnabled())
+            if (LOG.isTraceEnabled()) {
                 LOG.trace("Loading XML config from bundle [#0]", bundleName);
+            }
 
             //XML config
             PackageLoader loader = new BundlePackageLoader();