Revision: 1491
          http://stripes.svn.sourceforge.net/stripes/?rev=1491&view=rev
Author:   bengunter
Date:     2012-05-17 18:12:05 +0000 (Thu, 17 May 2012)
Log Message:
-----------
Applied fix for STS-877 from 1.5.x branch.

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

Property Changed:
----------------
    trunk/


Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - 
/branches/1.5.x:1463-1464,1466,1468-1469,1471,1473,1475,1477-1478,1482,1484,1486,1488
   + 
/branches/1.5.x:1463-1464,1466,1468-1469,1471,1473,1475,1477-1478,1482,1484,1486,1488,1490

Modified: 
trunk/stripes/src/net/sourceforge/stripes/validation/ValidationMetadata.java
===================================================================
--- 
trunk/stripes/src/net/sourceforge/stripes/validation/ValidationMetadata.java    
    2012-05-17 18:09:19 UTC (rev 1490)
+++ 
trunk/stripes/src/net/sourceforge/stripes/validation/ValidationMetadata.java    
    2012-05-17 18:12:05 UTC (rev 1491)
@@ -205,6 +205,14 @@
             this.on = null;
         }
         else {
+            // Check for empty strings in the "on" element
+            for (String s : on) {
+                if (s.isEmpty() || "!".equals(s)) {
+                    throw new IllegalArgumentException(
+                            "@Validate's \"on\" element must not contain empty 
strings");
+                }
+            }
+
             this.on = new HashSet<String>();
             this.onIsPositive = !(on[0].charAt(0) == '!');
             for (String s : on) {

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


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to