dlr 01/07/24 22:39:03
Modified: src/java/org/apache/turbine Turbine.java
Log:
Removed early return (having only one exit point from a method is
preferable).
Revision Changes Path
1.79 +25 -24 jakarta-turbine/src/java/org/apache/turbine/Turbine.java
Index: Turbine.java
===================================================================
RCS file: /home/cvs/jakarta-turbine/src/java/org/apache/turbine/Turbine.java,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -u -r1.78 -r1.79
--- Turbine.java 2001/07/25 01:04:53 1.78
+++ Turbine.java 2001/07/25 05:39:03 1.79
@@ -108,7 +108,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Frank Y. Kim</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Rafal Krzewski</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
- * @version $Id: Turbine.java,v 1.78 2001/07/25 01:04:53 jvanzyl Exp $
+ * @version $Id: Turbine.java,v 1.79 2001/07/25 05:39:03 dlr Exp $
*/
public class Turbine
extends HttpServlet
@@ -255,30 +255,32 @@
// in catalina there is also a ValveContext which
// can alter the execution path of the valves. What
// is listed below here could eventually be anything :-)
- if(!pipeline.process(data)) return;
- pipeline.preExecuteAction(data);
- pipeline.executeAction(data);
- pipeline.postExecuteAction(data);
- pipeline.execute(data);
- pipeline.finished(data);
-
- /*
-
- We don't need the ECS element stored in RunData because
- the pipeline takes care of the output but this logic
- should make its way into the pipeline
-
- // Handle the case where a module may want to send
- // a redirect.
- if (( data.getStatusCode() == 301 ||
- data.getStatusCode() == 302 ) &&
- data.getRedirectURI() != null )
+ if (pipeline.process(data))
{
- data.getResponse().sendRedirect(data.getRedirectURI());
+ pipeline.preExecuteAction(data);
+ pipeline.executeAction(data);
+ pipeline.postExecuteAction(data);
+ pipeline.execute(data);
+ pipeline.finished(data);
+
+ /*
+
+ We don't need the ECS element stored in RunData because
+ the pipeline takes care of the output but this logic
+ should make its way into the pipeline
+
+ // Handle the case where a module may want to send
+ // a redirect.
+ if (( data.getStatusCode() == 301 ||
+ data.getStatusCode() == 302 ) &&
+ data.getRedirectURI() != null )
+ {
+ data.getResponse().sendRedirect(data.getRedirectURI());
+ }
+ */
}
- */
}
- catch ( Exception e )
+ catch (Exception e)
{
handleException(data, res, e);
}
@@ -293,9 +295,8 @@
{
data.getOut().close();
}
- catch (Exception e)
+ catch (Exception ignored)
{
- // Ignore.
}
// Return the used RunData to the factory for recycling.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]