webwork/src/main/webwork/dispatcher GenericDispatcher.java,1.18,1.19

[email protected] Sat, 09 Jul 2005 12:03:37 -0700
Newsgroups gmane.comp.java.open-symphony.cvs
Message-ID <[email protected]>
Update of /cvsroot/opensymphony/webwork/src/main/webwork/dispatcher
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9675/src/main/webwork/dispatcher

Modified Files:
	GenericDispatcher.java 
Log Message:
Null out action context if we don't have an old table
Lazily create action context if it's null


Index: GenericDispatcher.java
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/main/webwork/dispatcher/GenericDispatcher.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- GenericDispatcher.java	17 Jan 2005 07:28:10 -0000	1.18
+++ GenericDispatcher.java	9 Jul 2005 19:03:34 -0000	1.19
@@ -217,10 +217,17 @@
       }
 
       // Create a new context
-      ActionContext newContext = new ActionContext();
-      // Set old values in it
-      newContext.setTable(oldContextTable);
-      ActionContext.setContext(newContext);
+     if(oldContextTable != null) 
+     {
+        ActionContext newContext = new ActionContext();
+        // Set old values in it
+        newContext.setTable(oldContextTable);
+        ActionContext.setContext(newContext);
+     }
+     else
+     {
+       ActionContext.setContext(null);
+     }
    }
 
    public class LazyValueHolder implements ValueStack.ValueHolder



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar