webwork/src/main/webwork/action ActionSupport.java,1.32,1.33

[email protected] Mon, 17 Jun 2002 10:24:23 -0700
Newsgroups gmane.comp.java.webwork.cvs
Message-ID <[email protected]>
Update of /cvsroot/webwork/webwork/src/main/webwork/action
In directory usw-pr-cvs1:/tmp/cvs-serv28734

Modified Files:
	ActionSupport.java 
Log Message:
updated hasError methods to respond properly when there is 
a non-null value but size is 0

Index: ActionSupport.java
===================================================================
RCS file: /cvsroot/webwork/webwork/src/main/webwork/action/ActionSupport.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- ActionSupport.java	13 Jun 2002 17:10:38 -0000	1.32
+++ ActionSupport.java	17 Jun 2002 17:24:20 -0000	1.33
@@ -161,7 +161,7 @@
     */
    public boolean getHasErrorMessages()
    {
-      return errorMessages != null && errorMessages.size() != 0;
+      return (errorMessages == null) ? false : errorMessages.size() > 0;
    }
 
    /**
@@ -219,7 +219,7 @@
     */
    public boolean getHasErrors()
    {
-      return errorMap != null;
+      return (errorMap==null) ? false : errorMap.size()>0;
    }
 
    /**



_______________________________________________________________

Sponsored by:
ThinkGeek at http://www.ThinkGeek.com/