Revision: 605
          http://stripes.svn.sourceforge.net/stripes/?rev=605&view=rev
Author:   bengunter
Date:     2007-08-23 18:40:24 -0700 (Thu, 23 Aug 2007)

Log Message:
-----------
Fixed STS-407: throw exception when field is empty in ValidationErrors#add()

Modified Paths:
--------------
    trunk/stripes/src/net/sourceforge/stripes/validation/ValidationErrors.java

Modified: 
trunk/stripes/src/net/sourceforge/stripes/validation/ValidationErrors.java
===================================================================
--- trunk/stripes/src/net/sourceforge/stripes/validation/ValidationErrors.java  
2007-08-24 01:17:10 UTC (rev 604)
+++ trunk/stripes/src/net/sourceforge/stripes/validation/ValidationErrors.java  
2007-08-24 01:40:24 UTC (rev 605)
@@ -60,6 +60,8 @@
      * @param error a ValidationError to add to that field
      */
     public void add(String field, ValidationError error) {
+        if (field == null || field.length() == 0)
+            throw new IllegalArgumentException("field must not be empty or 
null");
         put(field, error);
     }
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to