struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From germu...@apache.org
Subject svn commit: r165627 - /struts/core/trunk/src/share/org/apache/struts/chain/commands/ExecuteCommand.java
Date Mon, 02 May 2005 13:18:38 GMT
Author: germuska
Date: Mon May  2 06:18:37 2005
New Revision: 165627

URL: http://svn.apache.org/viewcvs?rev=165627&view=rev
Log:
skip lookup when no command is defined, since that's a common occurrence.

Modified:
    struts/core/trunk/src/share/org/apache/struts/chain/commands/ExecuteCommand.java

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/ExecuteCommand.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/ExecuteCommand.java?rev=165627&r1=165626&r2=165627&view=diff
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/ExecuteCommand.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/ExecuteCommand.java Mon May
 2 06:18:37 2005
@@ -111,13 +111,16 @@
      * @return
      */
     protected Command getCommand(String commandName, String catalogName) {
+
+        if (commandName == null) return null;
+        
         Command command = null;
         Catalog catalog = null;
 
         if (catalogName != null) {
             catalog = CatalogFactory.getInstance().getCatalog(catalogName);
             if (catalog == null) {
-                log.warn("No catalog found under " + catalogName);
+                log.warn("When looking up " + commandName + ", no catalog found under " +
catalogName);
                 return null;
             }
 
@@ -125,7 +128,7 @@
             catalogName = "the default catalog";
             catalog = CatalogFactory.getInstance().getCatalog();
             if (catalog == null) {
-                log.warn("No default catalog found.");
+                log.warn("When looking up " + commandName + ", no default catalog found.");
                 return null;
             }
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Mime
View raw message