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 [2/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...

Modified: struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java (original)
+++ struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/DefaultOValValidationManager.java Tue May  3 17:53:55 2011
@@ -55,8 +55,9 @@ public class DefaultOValValidationManage
         configurers.add(annotationsConfigurer);
 
         if (validateJPAAnnotations) {
-            if (LOG.isDebugEnabled())
+            if (LOG.isDebugEnabled()) {
                 LOG.debug("Adding support for JPA annotations validations in OVal");
+            }
             configurers.add(new JPAAnnotationsConfigurer());
         }
     }
@@ -139,8 +140,9 @@ public class DefaultOValValidationManage
                 is = FileManager.loadFile(fileName, clazz);
 
                 if (is != null) {
-                    if (LOG.isDebugEnabled())
+                    if (LOG.isDebugEnabled()) {
                         LOG.debug("Loading validation xml file [#0]", fileName);
+                    }
                     XMLConfigurer configurer = new XMLConfigurer();
                     configurer.fromXML(is);
                     validatorFileCache.put(fileName, configurer);
@@ -161,4 +163,4 @@ public class DefaultOValValidationManage
 
         return null;
     }
-}
\ No newline at end of file
+}

Modified: struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java (original)
+++ struts/struts2/trunk/plugins/oval/src/main/java/org/apache/struts2/oval/interceptor/OValValidationInterceptor.java Tue May  3 17:53:55 2011
@@ -128,7 +128,9 @@ public class OValValidationInterceptor e
             } catch (Exception e) {
                 // If any exception occurred while doing reflection, we want
                 // validate() to be executed
-                LOG.warn("An exception occured while executing the prefix method", e);
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("An exception occured while executing the prefix method", e);
+                }
                 exception = e;
             }
 
@@ -157,8 +159,9 @@ public class OValValidationInterceptor e
                 String[] profileNames = profiles.value();
                 if (profileNames != null && profileNames.length > 0) {
                     validator.disableAllProfiles();
-                    if (LOG.isDebugEnabled())
+                    if (LOG.isDebugEnabled()) {
                         LOG.debug("Enabling profiles [#0]", StringUtils.join(profileNames, ","));
+                    }
                     for (String profileName : profileNames)
                         validator.enableProfile(profileName);
                 }
@@ -187,7 +190,9 @@ public class OValValidationInterceptor e
                 }
 
                 if (isActionError(violation)) {
+                    if (LOG.isDebugEnabled()) {
                 	LOG.debug("Adding action error '#0'", message);
+                    }
                     validatorContext.addActionError(message);
                 } else {
                     ValidationError validationError = buildValidationError(violation, message);
@@ -198,7 +203,9 @@ public class OValValidationInterceptor e
                     	fieldName = parentFieldname + "." + fieldName;
                     }
 
-                    LOG.debug("Adding field error [#0] with message '#1'", fieldName, validationError.getMessage());
+                    if (LOG.isDebugEnabled()) {
+                	LOG.debug("Adding field error [#0] with message '#1'", fieldName, validationError.getMessage());
+                    }
                     validatorContext.addFieldError(fieldName, validationError.getMessage());
 
                     // don't add "model." prefix to fields of model in model driven action

Modified: struts/struts2/trunk/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java (original)
+++ struts/struts2/trunk/plugins/pell-multipart/src/main/java/org/apache/struts2/dispatcher/multipart/PellMultiPartRequest.java Tue May  3 17:53:55 2011
@@ -158,7 +158,9 @@ public class PellMultiPartRequest implem
                 http.utils.multipartrequest.MultipartRequest.setEncoding("UTF-8");
             }
         } catch (IllegalArgumentException e) {
-            LOG.info("Could not get encoding property 'struts.i18n.encoding' for file upload.  Using system default");
+            if (LOG.isInfoEnabled()) {
+        	LOG.info("Could not get encoding property 'struts.i18n.encoding' for file upload.  Using system default");
+            }
         } catch (UnsupportedEncodingException e) {
             LOG.error("Encoding " + encoding + " is not a valid encoding.  Please check your struts.properties file.");
         }

Modified: struts/struts2/trunk/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusFilter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusFilter.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusFilter.java (original)
+++ struts/struts2/trunk/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusFilter.java Tue May  3 17:53:55 2011
@@ -82,7 +82,9 @@ public class PlexusFilter implements Fil
                 }
 
                 if (parent.hasChildContainer(CHILD_CONTAINER_NAME)) {
-                    LOG.warn("Plexus container (scope: request) alredy exist.");
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("Plexus container (scope: request) alredy exist.");
+                    }
                     child = parent.getChildContainer(CHILD_CONTAINER_NAME);
                 } else {
                     child = parent.createChildContainer(CHILD_CONTAINER_NAME, Collections.EMPTY_LIST, Collections.EMPTY_MAP);

Modified: struts/struts2/trunk/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusObjectFactory.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusObjectFactory.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusObjectFactory.java (original)
+++ struts/struts2/trunk/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusObjectFactory.java Tue May  3 17:53:55 2011
@@ -294,7 +294,9 @@ public class PlexusObjectFactory extends
             return pc.lookup(role, roleHint);
         }
         catch (Exception e) {
-            LOG.debug("Can't load component (" + role + "/" + roleHint + ") with plexus, try now with struts.", e);
+            if (LOG.isDebugEnabled()) {
+        	LOG.debug("Can't load component (" + role + "/" + roleHint + ") with plexus, try now with struts.", e);
+            }
             Object o = super.buildBean(super.getClassInstance(role), extraContext);
             pc.autowire(o);
             return o;

Modified: struts/struts2/trunk/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusUtils.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusUtils.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusUtils.java (original)
+++ struts/struts2/trunk/plugins/plexus/src/main/java/org/apache/struts2/plexus/PlexusUtils.java Tue May  3 17:53:55 2011
@@ -47,7 +47,9 @@ public class PlexusUtils {
     public static void configure(PlexusContainer pc, String file) throws PlexusConfigurationResourceException {
         InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(file);
         if (is == null) {
-            LOG.info("Could not find " + file + ", skipping");
+            if (LOG.isInfoEnabled()) {
+        	LOG.info("Could not find " + file + ", skipping");
+            }
             is = new ByteArrayInputStream("<plexus><components></components></plexus>".getBytes());
         }
         pc.setConfigurationResource(new InputStreamReader(is));

Modified: struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/context/PreparatorServlet.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/context/PreparatorServlet.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/context/PreparatorServlet.java (original)
+++ struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/context/PreparatorServlet.java Tue May  3 17:53:55 2011
@@ -44,7 +44,9 @@ public class PreparatorServlet extends H
 
 	@Override
 	public void init(ServletConfig config) throws ServletException {
+            if (LOG.isWarnEnabled()) {
 		LOG.warn("The preparator servlet has been deprecated. It can safely be removed from your web.xml file");
+            }
 	}
 
 }

Modified: struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/context/ServletContextHolderListener.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/context/ServletContextHolderListener.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/context/ServletContextHolderListener.java (original)
+++ struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/context/ServletContextHolderListener.java Tue May  3 17:53:55 2011
@@ -53,7 +53,9 @@ public class ServletContextHolderListene
      * @see javax.servlet.ServletContextListener#contextInitialized(javax.servlet.ServletContextEvent)
      */
     public void contextInitialized(ServletContextEvent event) {
-    	LOG.warn("The ServletContextHolderListener has been deprecated. It can safely be removed from your web.xml file");
+        if (LOG.isWarnEnabled()) {
+    		LOG.warn("The ServletContextHolderListener has been deprecated. It can safely be removed from your web.xml file");
+        }
         context = event.getServletContext();
     }
 

Modified: struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java (original)
+++ struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/dispatcher/Jsr168Dispatcher.java Tue May  3 17:53:55 2011
@@ -442,8 +442,9 @@ public class Jsr168Dispatcher extends Ge
                     sessionMap, applicationMap, request, response, servletRequest, servletResponse,
                     servletContext, getPortletConfig(), phase);
             extraContext.put(PortletActionConstants.ACTION_MAPPING, mapping);
-            LOG.debug("Creating action proxy for name = " + actionName
-                    + ", namespace = " + namespace);
+            if (LOG.isDebugEnabled()) {
+        	LOG.debug("Creating action proxy for name = " + actionName + ", namespace = " + namespace);
+            }
             ActionProxy proxy = factory.createActionProxy(namespace,
                     actionName, mapping.getMethod(), extraContext);
             request.setAttribute("struts.valueStack", proxy.getInvocation()
@@ -609,7 +610,9 @@ public class Jsr168Dispatcher extends Ge
 
     public void destroy() {
         if (dispatcherUtils == null) {
-            LOG.warn("something is seriously wrong, DispatcherUtil is not initialized (null) ");
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("something is seriously wrong, DispatcherUtil is not initialized (null) ");
+            }
         } else {
             dispatcherUtils.cleanup();
         }

Modified: struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletAwareInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletAwareInterceptor.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletAwareInterceptor.java (original)
+++ struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/interceptor/PortletAwareInterceptor.java Tue May  3 17:53:55 2011
@@ -79,7 +79,9 @@ public class PortletAwareInterceptor ext
             
             // Check if running in a servlet environment
             if (request == null) {
-                LOG.warn("This portlet preferences implementation should only be used during development");
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("This portlet preferences implementation should only be used during development");
+                }
                 ((PortletPreferencesAware)action).setPortletPreferences(new ServletPortletPreferences(ActionContext.getContext().getSession()));
             } else {
             	((PortletPreferencesAware)action).setPortletPreferences(request.getPreferences());

Modified: struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java (original)
+++ struts/struts2/trunk/plugins/portlet/src/main/java/org/apache/struts2/portlet/util/PortletUrlHelper.java Tue May  3 17:53:55 2011
@@ -78,8 +78,10 @@ public class PortletUrlHelper {
     	StringBuffer resultingAction = new StringBuffer();
         RenderRequest request = PortletActionContext.getRenderRequest();
         RenderResponse response = PortletActionContext.getRenderResponse();
-        LOG.debug("Creating url. Action = " + action + ", Namespace = "
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Creating url. Action = " + action + ", Namespace = "
                 + namespace + ", Type = " + type);
+        }
         namespace = prependNamespace(namespace, portletMode);
         if (StringUtils.isEmpty(portletMode)) {
             portletMode = PortletActionContext.getRenderRequest().getPortletMode().toString();

Modified: struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java (original)
+++ struts/struts2/trunk/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java Tue May  3 17:53:55 2011
@@ -358,11 +358,10 @@ public class RestActionInvocation extend
         	ResultConfig resultConfig = this.proxy.getConfig().getResults()
         		.get(defaultErrorResultName);
         	if (resultConfig != null) {
-        		this.result = objectFactory.buildResult(resultConfig, 
-            			invocationContext.getContextMap());
-        		if (LOG.isDebugEnabled()) {
-	                LOG.debug("Found default error result.");
-	            }
+        	    this.result = objectFactory.buildResult(resultConfig, invocationContext.getContextMap());
+        	    if (LOG.isDebugEnabled()) {
+        		LOG.debug("Found default error result.");
+        	    }
         	}
         }
 		
@@ -446,7 +445,9 @@ public class RestActionInvocation extend
 		     message += "] took " + total + " ms (execution: " + executionTime 
 		     	+ " ms, result: " + processResult + " ms)";
 		     
-		     LOG.info(message);
+		     if (LOG.isInfoEnabled()) {
+			 LOG.info(message);
+		     }
 	     }
 	}
 	

Modified: struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java (original)
+++ struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/SiteGraph.java Tue May  3 17:53:55 2011
@@ -66,7 +66,9 @@ public class SiteGraph {
     }
 
     public static void main(String[] args) throws IOException {
-        LOG.info("SiteGraph starting...");
+        if (LOG.isInfoEnabled()) {
+            LOG.info("SiteGraph starting...");
+        }
 
         if (args.length != 8 && args.length != 6) {
             InputStream is = SiteGraph.class.getResourceAsStream("sitegraph-usage.txt");

Modified: struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/entities/FileBasedView.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/entities/FileBasedView.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/entities/FileBasedView.java (original)
+++ struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/entities/FileBasedView.java Tue May  3 17:53:55 2011
@@ -104,7 +104,9 @@ public abstract class FileBasedView impl
 
             return buffer.toString();
         } catch (FileNotFoundException e) {
-            LOG.warn("File not found");
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("File not found");
+            }
         } catch (IOException e) {
             LOG.error("Cannot read file: "+file, e);
         }

Modified: struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java (original)
+++ struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/ClassReloadingXMLWebApplicationContext.java Tue May  3 17:53:55 2011
@@ -109,7 +109,9 @@ public class ClassReloadingXMLWebApplica
                 classLoader.addResourceStore(new JarResourceStore(file));
                 //register with the fam
                 fam.addListener(file, this);
-                LOG.debug("Watching [#0] for changes", file.getAbsolutePath());
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("Watching [#0] for changes", file.getAbsolutePath());
+                }
             } else {
                 //get all subdirs
                 List<File> dirs = new ArrayList<File>();
@@ -120,7 +122,9 @@ public class ClassReloadingXMLWebApplica
                 for (File dir : dirs) {
                     //register with the fam
                     fam.addListener(dir, this);
-                    LOG.debug("Watching [#0] for changes", dir.getAbsolutePath());
+                    if (LOG.isDebugEnabled()) {
+                	LOG.debug("Watching [#0] for changes", dir.getAbsolutePath());
+                    }
                 }
             }
         }

Modified: struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java (original)
+++ struts/struts2/trunk/plugins/spring/src/main/java/org/apache/struts2/spring/StrutsSpringObjectFactory.java Tue May  3 17:53:55 2011
@@ -73,7 +73,9 @@ public class StrutsSpringObjectFactory e
           
         super();
         boolean useClassCache = "true".equals(useClassCacheStr);
-        LOG.info("Initializing Struts-Spring integration...");
+        if (LOG.isInfoEnabled()) {
+            LOG.info("Initializing Struts-Spring integration...");
+        }
 
         Object rootWebApplicationContext =  servletContext.getAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
 
@@ -109,7 +111,9 @@ public class StrutsSpringObjectFactory e
 
             ClassReloadingXMLWebApplicationContext reloadingContext = (ClassReloadingXMLWebApplicationContext) appContext;
             reloadingContext.setupReloading(watchList.split(","), acceptClasses, servletContext, "true".equals(reloadConfig));
-            LOG.info("Class reloading is enabled. Make sure this is not used on a production environment!", watchList);
+            if (LOG.isInfoEnabled()) {
+        	LOG.info("Class reloading is enabled. Make sure this is not used on a production environment!", watchList);
+            }
 
             setClassLoader(reloadingContext.getReloadingClassLoader());
 
@@ -137,6 +141,8 @@ public class StrutsSpringObjectFactory e
 
         this.setAlwaysRespectAutowireStrategy("true".equalsIgnoreCase(alwaysAutoWire));
 
-        LOG.info("... initialized Struts-Spring integration successfully");
+        if (LOG.isInfoEnabled()) {
+            LOG.info("... initialized Struts-Spring integration successfully");
+        }
     }
 }

Modified: struts/struts2/trunk/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesListener.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesListener.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesListener.java (original)
+++ struts/struts2/trunk/plugins/tiles/src/main/java/org/apache/struts2/tiles/StrutsTilesListener.java Tue May  3 17:53:55 2011
@@ -63,7 +63,9 @@ public class StrutsTilesListener extends
             context = decorate(context);
         }
         else {
-            LOG.warn("Tiles container factory is explicitly set.  Not injecting struts configuration.");
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Tiles container factory is explicitly set.  Not injecting struts configuration.");
+            }
         }
         return super.createContainer(context);
     }

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ActionSupport.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ActionSupport.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ActionSupport.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ActionSupport.java Tue May  3 17:53:55 2011
@@ -87,7 +87,9 @@ public class ActionSupport implements Ac
         if (ctx != null) {
             return ctx.getLocale();
         } else {
-            LOG.debug("Action context not initialized");
+            if (LOG.isDebugEnabled()) {
+        	LOG.debug("Action context not initialized");
+            }
             return null;
         }
     }

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/ConfigurationManager.java Tue May  3 17:53:55 2011
@@ -199,7 +199,9 @@ public class ConfigurationManager {
                 containerProvider.destroy();
             }
             catch(Exception e) {
-                LOG.warn("error while destroying container provider ["+containerProvider+"]", e);
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("error while destroying container provider ["+containerProvider+"]", e);
+                }
             }
         }
         containerProviders.clear();
@@ -261,7 +263,9 @@ public class ConfigurationManager {
                 		containerProvider.destroy();
                 	}
                 	catch(Exception e) {
+                            if (LOG.isWarnEnabled()) {
                 		LOG.warn("error while destroying configuration provider ["+containerProvider+"]", e);
+                            }
                 	}
                 }
                 packageProviders = configuration.reloadContainer(providers);

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/impl/DefaultConfiguration.java Tue May  3 17:53:55 2011
@@ -467,7 +467,7 @@ public class DefaultConfiguration implem
         @Override
         public Object setProperty(String key, String value) {
             String oldValue = getProperty(key);
-            if (oldValue != null && !oldValue.equals(value) && !defaultFrameworkBeanName.equals(oldValue)) {
+            if (LOG.isInfoEnabled() && oldValue != null && !oldValue.equals(value) && !defaultFrameworkBeanName.equals(oldValue)) {
                 LOG.info("Overriding property "+key+" - old value: "+oldValue+" new value: "+value);
             }
             return super.setProperty(key, value);

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/config/providers/InterceptorBuilder.java Tue May  3 17:53:55 2011
@@ -70,9 +70,11 @@ public class InterceptorBuilder {
                     inter = objectFactory.buildInterceptor(config, refParams);
                     result.add(new InterceptorMapping(refName, inter));
                 } catch (ConfigurationException ex) {
-                    LOG.warn("Unable to load config class " + config.getClassName() + " at " +
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("Unable to load config class " + config.getClassName() + " at " +
                             ex.getLocation() + " probably due to a missing jar, which might " +
                             "be fine if you never plan to use the " + config.getName() + " interceptor");
+                    }
                     LOG.error("Actual exception", ex);
                 }
 
@@ -147,7 +149,9 @@ public class InterceptorBuilder {
                 params.put(name, map);
 
             } catch (Exception e) {
-                LOG.warn("No interceptor found for name = " + key);
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("No interceptor found for name = " + key);
+                }
             }
         }
 

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=1099157&r1=1099156&r2=1099157&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 Tue May  3 17:53:55 2011
@@ -160,7 +160,9 @@ public class XmlConfigurationProvider im
     }
 
     public void register(ContainerBuilder containerBuilder, LocatableProperties props) throws ConfigurationException {
-        LOG.info("Parsing configuration file [" + configFileName + "]");
+        if (LOG.isInfoEnabled()) {
+            LOG.info("Parsing configuration file [" + configFileName + "]");
+        }
         Map<String, Node> loadedBeans = new HashMap<String, Node>();
         for (Document doc : documents) {
             Element rootElement = doc.getDocumentElement();
@@ -346,7 +348,9 @@ public class XmlConfigurationProvider im
         Location location = DomHelper.getLocationObject(actionElement);
 
         if (location == null) {
-            LOG.warn("location null for " + className);
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("location null for " + className);
+            }
         }
         //methodName should be null if it's not set
         methodName = (methodName.trim().length() > 0) ? methodName.trim() : null;
@@ -425,7 +429,9 @@ public class XmlConfigurationProvider im
             throw new ConfigurationException("Action class [" + className + "] does not have a public no-arg constructor", e, loc);
         } catch (RuntimeException ex) {
             // Probably not a big deal, like request or session-scoped Spring 2 beans that need a real request
-            LOG.info("Unable to verify action class [" + className + "] exists at initialization");
+            if (LOG.isInfoEnabled()) {
+        	LOG.info("Unable to verify action class [" + className + "] exists at initialization");
+            }
             if (LOG.isDebugEnabled()) {
                 LOG.debug("Action verification cause", ex);
             }
@@ -529,11 +535,15 @@ public class XmlConfigurationProvider im
         try {
             return objectFactory.getClassInstance(className);
         } catch (ClassNotFoundException e) {
-            LOG.warn("Result class [" + className + "] doesn't exist (ClassNotFoundException) at " +
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Result class [" + className + "] doesn't exist (ClassNotFoundException) at " +
                     loc.toString() + ", ignoring", e);
+            }
         } catch (NoClassDefFoundError e) {
-            LOG.warn("Result class [" + className + "] doesn't exist (NoClassDefFoundError) at " +
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Result class [" + className + "] doesn't exist (NoClassDefFoundError) at " +
                     loc.toString() + ", ignoring", e);
+            }
         }
 
         return null;
@@ -665,7 +675,9 @@ public class XmlConfigurationProvider im
                                 resultParams.put(paramName, val);
                             }
                         } else {
-                            LOG.warn("no default parameter defined for result of type " + config.getName());
+                            if (LOG.isWarnEnabled()) {
+                        	LOG.warn("no default parameter defined for result of type " + config.getName());
+                            }
                         }
                     }
                 }
@@ -885,8 +897,10 @@ public class XmlConfigurationProvider im
                 if (errorIfMissing) {
                     throw new ConfigurationException("Could not open files of the name " + fileName, ioException);
                 } else {
-                    LOG.info("Unable to locate configuration files of the name "
+                    if (LOG.isInfoEnabled()) {
+                	LOG.info("Unable to locate configuration files of the name "
                             + fileName + ", skipping");
+                    }
                     return docs;
                 }
             }

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/conversion/impl/DefaultObjectTypeDeterminer.java Tue May  3 17:53:55 2011
@@ -131,7 +131,7 @@ public class DefaultObjectTypeDeterminer
             clazz = (Class) xworkConverter
                     .getConverter(parentClass, DEPRECATED_ELEMENT_PREFIX + property);
 
-            if (clazz != null) {
+            if (LOG.isInfoEnabled() && clazz != null) {
                 LOG.info("The Collection_xxx pattern for collection type conversion is deprecated. Please use Element_xxx!");
             }
         }

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/AliasInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/AliasInterceptor.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/AliasInterceptor.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/AliasInterceptor.java Tue May  3 17:53:55 2011
@@ -183,7 +183,9 @@ public class AliasInterceptor extends Ab
                 if (clearableStack && (stack.getContext() != null) && (newStack.getContext() != null))
                     stack.getContext().put(ActionContext.CONVERSION_ERRORS, newStack.getContext().get(ActionContext.CONVERSION_ERRORS));
             } else {
-                LOG.debug("invalid alias expression:" + aliasesKey);
+                if (LOG.isDebugEnabled()) {
+                    LOG.debug("invalid alias expression:" + aliasesKey);
+                }
             }
         }
         

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/LoggingInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/LoggingInterceptor.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/LoggingInterceptor.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/LoggingInterceptor.java Tue May  3 17:53:55 2011
@@ -79,7 +79,9 @@ public class LoggingInterceptor extends 
             }
 
             message.append(invocation.getProxy().getActionName());
-            LOG.info(message.toString());
+            if (LOG.isInfoEnabled()) {
+        	LOG.info(message.toString());
+            }
         }
     }
 

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java Tue May  3 17:53:55 2011
@@ -244,7 +244,9 @@ public class OgnlUtil {
      */
     public void copy(Object from, Object to, Map<String, Object> context, Collection<String> exclusions, Collection<String> inclusions) {
         if (from == null || to == null) {
-            LOG.warn("Attempting to copy from or to a null source. This is illegal and is bein skipped. This may be due to an error in an OGNL expression, action chaining, or some other event.");
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Attempting to copy from or to a null source. This is illegal and is bein skipped. This may be due to an error in an OGNL expression, action chaining, or some other event.");
+            }
 
             return;
         }

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkCollectionPropertyAccessor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkCollectionPropertyAccessor.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkCollectionPropertyAccessor.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/ognl/accessor/XWorkCollectionPropertyAccessor.java Tue May  3 17:53:55 2011
@@ -81,7 +81,9 @@ public class XWorkCollectionPropertyAcce
     public Object getProperty(Map context, Object target, Object key)
             throws OgnlException {
 
-        LOG.debug("Entering getProperty()");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Entering getProperty()");
+        }
 
         //check if it is a generic type property.
         //if so, return the value from the
@@ -185,13 +187,19 @@ public class XWorkCollectionPropertyAcce
       */
     private Map getSetMap(Map context, Collection collection, String property, Class valueClass)
             throws OgnlException {
-        LOG.debug("getting set Map");
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("getting set Map");
+        }
+        
         String path = ReflectionContextState.getCurrentPropertyPath(context);
         Map map = ReflectionContextState.getSetMap(context,
                 path);
 
         if (map == null) {
-            LOG.debug("creating set Map");
+            if (LOG.isDebugEnabled()) {
+        	LOG.debug("creating set Map");
+            }
+            
             map = new HashMap();
             map.put(null, new SurrugateList(collection));
             for (Object currTest : collection) {

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringObjectFactory.java Tue May  3 17:53:55 2011
@@ -74,23 +74,33 @@ public class SpringObjectFactory extends
     public void setAutowireStrategy(int autowireStrategy) {
         switch (autowireStrategy) {
             case AutowireCapableBeanFactory.AUTOWIRE_AUTODETECT:
-                LOG.info("Setting autowire strategy to autodetect");
+                if (LOG.isInfoEnabled()) {
+                    LOG.info("Setting autowire strategy to autodetect");
+                }
                 this.autowireStrategy = autowireStrategy;
                 break;
             case AutowireCapableBeanFactory.AUTOWIRE_BY_NAME:
-                LOG.info("Setting autowire strategy to name");
+                if (LOG.isInfoEnabled()) {
+                    LOG.info("Setting autowire strategy to name");
+                }
                 this.autowireStrategy = autowireStrategy;
                 break;
             case AutowireCapableBeanFactory.AUTOWIRE_BY_TYPE:
-                LOG.info("Setting autowire strategy to type");
+                if (LOG.isInfoEnabled()) {
+                    LOG.info("Setting autowire strategy to type");
+                }
                 this.autowireStrategy = autowireStrategy;
                 break;
             case AutowireCapableBeanFactory.AUTOWIRE_CONSTRUCTOR:
-                LOG.info("Setting autowire strategy to constructor");
+                if (LOG.isInfoEnabled()) {
+                    LOG.info("Setting autowire strategy to constructor");
+                }
                 this.autowireStrategy = autowireStrategy;
                 break;
             case AutowireCapableBeanFactory.AUTOWIRE_NO:
-                LOG.info("Setting autowire strategy to none");
+                if (LOG.isInfoEnabled()) {
+                    LOG.info("Setting autowire strategy to none");
+                }
                 this.autowireStrategy = autowireStrategy;
                 break;
             default:

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringProxyableObjectFactory.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringProxyableObjectFactory.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringProxyableObjectFactory.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/SpringProxyableObjectFactory.java Tue May  3 17:53:55 2011
@@ -66,7 +66,9 @@ public class SpringProxyableObjectFactor
                         try {
                             return anAppContext.getBean(beanName);
                         } catch (NoSuchBeanDefinitionException e2) {
-                            LOG.warn("Could not register new bean definition for bean " + beanName);
+                            if (LOG.isWarnEnabled()) {
+                        	LOG.warn("Could not register new bean definition for bean " + beanName);
+                            }
                             skipBeanNames.add(beanName);
                         }
                     } catch (ClassNotFoundException e1) {

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/interceptor/ActionAutowiringInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/interceptor/ActionAutowiringInterceptor.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/interceptor/ActionAutowiringInterceptor.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/spring/interceptor/ActionAutowiringInterceptor.java Tue May  3 17:53:55 2011
@@ -97,7 +97,9 @@ public class ActionAutowiringInterceptor
                     WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE);
 
             if (applicationContext == null) {
-                LOG.warn("ApplicationContext could not be found.  Action classes will not be autowired.");
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("ApplicationContext could not be found.  Action classes will not be autowired.");
+                }
             } else {
                 setApplicationContext(applicationContext);
                 factory = new SpringObjectFactory();

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/FileManager.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/FileManager.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/FileManager.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/FileManager.java Tue May  3 17:53:55 2011
@@ -294,7 +294,9 @@ public class FileManager {
                     separatorIndex = fileName.lastIndexOf(JAR_FILE_EXTENSION_END);
                 }
                 if (separatorIndex == -1) {
-                    LOG.warn("Could not find end of jar file!");
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("Could not find end of jar file!");
+                    }
                     return null;
                 }
                 // Split file name
@@ -311,7 +313,9 @@ public class FileManager {
                     return null;
                 }
             } catch (Throwable e) {
-                LOG.warn("Could not create JarEntryRevision for [" + jarFileName + "]!", e);
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("Could not create JarEntryRevision for [" + jarFileName + "]!", e);
+                }
                 return null;
             }
         }

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/LocalizedTextUtil.java Tue May  3 17:53:55 2011
@@ -407,7 +407,9 @@ public class LocalizedTextUtil {
                                   ValueStack valueStack) {
         String indexedTextName = null;
         if (aTextName == null) {
-            LOG.warn("Trying to find text with null key!");
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Trying to find text with null key!");
+            }
             aTextName = "";
         }
         // calculate indexedTextName (collection[*]) if applicable
@@ -537,7 +539,7 @@ public class LocalizedTextUtil {
         }
 
         // could we find the text, if not log a warn
-        if (unableToFindTextForKey(result)) {
+        if (unableToFindTextForKey(result) && LOG.isDebugEnabled()) {
             String warn = "Unable to find text for key '" + aTextName + "' ";
             if (indexedTextName != null) {
                 warn += " or indexed key '" + indexedTextName + "' ";
@@ -632,7 +634,7 @@ public class LocalizedTextUtil {
         }
 
         GetDefaultMessageReturnArg result = getDefaultMessage(aTextName, locale, valueStack, args, defaultMessage);
-        if (unableToFindTextForKey(result)) {
+        if (LOG.isWarnEnabled() && unableToFindTextForKey(result)) {
             LOG.warn("Unable to find text for key '" + aTextName + "' in ResourceBundles for locale '" + locale + "'");
         }
         return result != null ? result.message : null;
@@ -803,7 +805,9 @@ public class LocalizedTextUtil {
                 }
             }
         } catch (Exception e) {
-            LOG.warn("couldn't clear tomcat cache", e);
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("couldn't clear tomcat cache", e);
+            }
         }
     }
 

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/ResolverUtil.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/ResolverUtil.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/ResolverUtil.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/ResolverUtil.java Tue May  3 17:53:55 2011
@@ -322,7 +322,9 @@ public class ResolverUtil<T> {
             urls = loader.getResources(packageName);
         }
         catch (IOException ioe) {
-            LOG.warn("Could not read package: " + packageName, ioe);
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Could not read package: " + packageName, ioe);
+            }
             return;
         }
 
@@ -341,7 +343,9 @@ public class ResolverUtil<T> {
                     urlPath = urlPath.substring(0, urlPath.indexOf('!'));
                 }
 
-                LOG.info("Scanning for classes in [" + urlPath + "] matching criteria: " + test);
+                if (LOG.isInfoEnabled()) {
+                    LOG.info("Scanning for classes in [" + urlPath + "] matching criteria: " + test);
+                }
                 File file = new File(urlPath);
                 if ( file.isDirectory() ) {
                     loadImplementationsInDirectory(test, packageName, file);
@@ -351,7 +355,9 @@ public class ResolverUtil<T> {
                 }
             }
             catch (IOException ioe) {
-                LOG.warn("could not read entries", ioe);
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("could not read entries", ioe);
+                }
             }
         }
     }
@@ -451,8 +457,10 @@ public class ResolverUtil<T> {
             }
         }
         catch (Throwable t) {
-            LOG.warn("Could not examine class '" + fqn + "' due to a " +
+            if (LOG.isWarnEnabled()) {
+        	LOG.warn("Could not examine class '" + fqn + "' due to a " +
                      t.getClass().getName() + " with message: " + t.getMessage());
+            }
         }
     }
 }
\ No newline at end of file

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/profiling/UtilTimerStack.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/profiling/UtilTimerStack.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/profiling/UtilTimerStack.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/util/profiling/UtilTimerStack.java Tue May  3 17:53:55 2011
@@ -355,7 +355,9 @@ public class UtilTimerStack
             {
                 printTimes(currentTimer);
                 current.set(null); //prevent printing multiple times
-                LOG.warn("Unmatched Timer.  Was expecting " + currentTimer.getResource() + ", instead got " + name);
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("Unmatched Timer.  Was expecting " + currentTimer.getResource() + ", instead got " + name);
+                }
             }
         }
 
@@ -369,7 +371,9 @@ public class UtilTimerStack
      */
     private static void printTimes(ProfilingTimerBean currentTimer)
     {
-        LOG.info(currentTimer.getPrintable(getMinTime()));
+        if (LOG.isInfoEnabled()) {
+            LOG.info(currentTimer.getPrintable(getMinTime()));
+        }
     }
 
     /**

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFileParser.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFileParser.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFileParser.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/DefaultValidatorFileParser.java Tue May  3 17:53:55 2011
@@ -231,7 +231,9 @@ public class DefaultValidatorFileParser 
                 if (messageParams != null && (messageParams.size() > 0)) {
                     // we are i18n message parameters defined but no i18n message,
                     // let's warn the user.
-                    LOG.warn("validator of type ["+validatorType+"] have i18n message parameters defined but no i18n message key, it's parameters will be ignored");
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("validator of type ["+validatorType+"] have i18n message parameters defined but no i18n message key, it's parameters will be ignored");
+                    }
                 }
             }
 

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/ValidationInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/ValidationInterceptor.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/ValidationInterceptor.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/ValidationInterceptor.java Tue May  3 17:53:55 2011
@@ -240,7 +240,9 @@ public class ValidationInterceptor exten
             catch(Exception e) {
                 // If any exception occurred while doing reflection, we want 
                 // validate() to be executed
-                LOG.warn("an exception occured while executing the prefix method", e);
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("an exception occured while executing the prefix method", e);
+                }
                 exception = e;
             }
             

Modified: struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RepopulateConversionErrorFieldValidatorSupport.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RepopulateConversionErrorFieldValidatorSupport.java?rev=1099157&r1=1099156&r2=1099157&view=diff
==============================================================================
--- struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RepopulateConversionErrorFieldValidatorSupport.java (original)
+++ struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/RepopulateConversionErrorFieldValidatorSupport.java Tue May  3 17:53:55 2011
@@ -174,7 +174,9 @@ public abstract class RepopulateConversi
                     doExprOverride = true;
                     fakeParams.put(fullFieldName, "'" + tmpValue[0] + "'");
                 } else {
-                    LOG.warn("value is an empty array of String or with first element in it as null [" + value + "], will not repopulate conversion error ");
+                    if (LOG.isWarnEnabled()) {
+                	LOG.warn("value is an empty array of String or with first element in it as null [" + value + "], will not repopulate conversion error ");
+                    }
                 }
             } else if (value instanceof String) {
                 String tmpValue = (String) value;
@@ -182,7 +184,9 @@ public abstract class RepopulateConversi
                 fakeParams.put(fullFieldName, "'" + tmpValue + "'");
             } else {
                 // opps... it should be 
-                LOG.warn("conversion error value is not a String or array of String but instead is [" + value + "], will not repopulate conversion error");
+                if (LOG.isWarnEnabled()) {
+                    LOG.warn("conversion error value is not a String or array of String but instead is [" + value + "], will not repopulate conversion error");
+                }
             }
 
             if (doExprOverride) {