struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apetre...@apache.org
Subject svn commit: r486634 - /struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/commands/TilesPreProcessor.java
Date Wed, 13 Dec 2006 13:09:03 GMT
Author: apetrelli
Date: Wed Dec 13 05:09:02 2006
New Revision: 486634

URL: http://svn.apache.org/viewvc?view=rev&rev=486634
Log:
STR-2986
Corrected TilesPreProcessor: the return value must be decided before rendering the definition.

Modified:
    struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/commands/TilesPreProcessor.java

Modified: struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/commands/TilesPreProcessor.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/commands/TilesPreProcessor.java?view=diff&rev=486634&r1=486633&r2=486634
==============================================================================
--- struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/commands/TilesPreProcessor.java
(original)
+++ struts/struts1/trunk/tiles2/src/main/java/org/apache/struts/tiles2/commands/TilesPreProcessor.java
Wed Dec 13 05:09:02 2006
@@ -89,6 +89,7 @@
         ForwardConfig forwardConfig = sacontext.getForwardConfig();
         if (forwardConfig == null || forwardConfig.getPath() == null)
         {
+            // this is not a serious error, so log at low priority
             log.debug("No forwardConfig or no path, so pass to next command.");
             return (false);
         }
@@ -101,9 +102,11 @@
             return false;
         }
         
+        boolean retValue = false;
+        
         if (container.isValidDefinition(sacontext.getRequest(),
         		sacontext.getResponse(), forwardConfig.getPath())) {
-            // this is not a serious error, so log at low priority
+            retValue = sacontext.getResponse().isCommitted();
 	        container.render(sacontext.getRequest(), sacontext.getResponse(),
 	        		forwardConfig.getPath());
         } else {
@@ -114,6 +117,6 @@
         	}
         }
         
-        return sacontext.getResponse().isCommitted();
+        return retValue;
     }
 }



Mime
View raw message