Commits

Anonymous committed 219b850

Minor cleanups in interceptors
XS-569

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@1635e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (3)

src/java/com/opensymphony/xwork2/interceptor/ExceptionMappingInterceptor.java

         try {
             result = invocation.invoke();
         } catch (Exception e) {
-            if (logEnabled) {
+            if (isLogEnabled()) {
                 handleLogging(e);
             }
             List exceptionMappings = invocation.getProxy().getConfig().getExceptionMappings();

src/java/com/opensymphony/xwork2/interceptor/LoggingInterceptor.java

     private static final String START_MESSAGE = "Starting execution stack for action ";
 
     public String intercept(ActionInvocation invocation) throws Exception {
-        logMessage(invocation, FINISH_MESSAGE);
-        String result = invocation.invoke();
         logMessage(invocation, START_MESSAGE);
+        String result = invocation.invoke();
+        logMessage(invocation, FINISH_MESSAGE);
         return result;
     }
 

src/java/com/opensymphony/xwork2/interceptor/ModelDrivenInterceptor.java

         if (action instanceof ModelDriven) {
             ModelDriven modelDriven = (ModelDriven) action;
             ValueStack stack = invocation.getStack();
-            if (modelDriven.getModel() !=  null) {
-            	stack.push(modelDriven.getModel());
+            Object model = modelDriven.getModel();
+            if (model !=  null) {
+            	stack.push(model);
             }
         }
         return invocation.invoke();