webwork/src/main/webwork/util AbstractValueStack.java,1.1,1.2

[email protected] Thu, 30 May 2002 15:56:44 -0700
Newsgroups gmane.comp.java.webwork.cvs
Message-ID <[email protected]>
Update of /cvsroot/webwork/webwork/src/main/webwork/util
In directory usw-pr-cvs1:/tmp/cvs-serv29155

Modified Files:
	AbstractValueStack.java 
Log Message:
NPE check for expression

Index: AbstractValueStack.java
===================================================================
RCS file: /cvsroot/webwork/webwork/src/main/webwork/util/AbstractValueStack.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- AbstractValueStack.java	26 May 2002 08:50:27 -0000	1.1
+++ AbstractValueStack.java	30 May 2002 22:56:42 -0000	1.2
@@ -110,6 +110,9 @@
     * @return  the boolean result of the expression
     */
    public boolean test(String expression) {
+      if (expression==null) {
+         throw new NullPointerException("Expression cannot be null.");
+      }
       Parser p = getParser(expression);
 
       boolean answer = false;
@@ -125,7 +128,7 @@
       return answer;
    }
 
-    // SK 
+    // SK
     /** Find a value by id. AbstractValueStack expects subclasses to
      *  have some context concept to evaluate @identified expressions.
      */
@@ -135,8 +138,8 @@
      *  have some request concept to evaluate $parameter expressions
      */
     abstract protected String getRequestParameter(String id);
-    // /SK 
-    
+    // /SK
+
    /**
     * Find a value for a given name.
     *



_______________________________________________________________

Don't miss the 2002 Sprint PCS Application Developer's Conference
August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm