devicemap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From re...@apache.org
Subject svn commit: r1693968 - /devicemap/trunk/clients/2.0/reference/src/Pattern.java
Date Mon, 03 Aug 2015 20:18:15 GMT
Author: rezan
Date: Mon Aug  3 20:18:15 2015
New Revision: 1693968

URL: http://svn.apache.org/r1693968
Log:
empty patterns

Modified:
    devicemap/trunk/clients/2.0/reference/src/Pattern.java

Modified: devicemap/trunk/clients/2.0/reference/src/Pattern.java
URL: http://svn.apache.org/viewvc/devicemap/trunk/clients/2.0/reference/src/Pattern.java?rev=1693968&r1=1693967&r2=1693968&view=diff
==============================================================================
--- devicemap/trunk/clients/2.0/reference/src/Pattern.java (original)
+++ devicemap/trunk/clients/2.0/reference/src/Pattern.java Mon Aug  3 20:18:15 2015
@@ -86,6 +86,10 @@ public class Pattern {
       patternTokens.add(patternToken.asText());
     }
 
+    if(patternTokens.isEmpty()) {
+      throw new Exception("No patternTokens found for: " + patternId);
+    }
+
     if(patternTokens.size() < 2 && (patternType.equals(PatternType.SimpleAnd)
||
         patternType.equals(PatternType.SimpleOrderedAnd))) {
       throw new Exception("patternType " + patternType + " requires more than 1 patternToken:
" + patternTokens);



Mime
View raw message