You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by pk...@apache.org on 2015/10/21 16:53:27 UTC

svn commit: r1709858 - /uima/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/ComposedRuleElementMatch.java

Author: pkluegl
Date: Wed Oct 21 14:53:26 2015
New Revision: 1709858

URL: http://svn.apache.org/viewvc?rev=1709858&view=rev
Log:
UIMA-4599
- check on on empty list

Modified:
    uima/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/ComposedRuleElementMatch.java

Modified: uima/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/ComposedRuleElementMatch.java
URL: http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/ComposedRuleElementMatch.java?rev=1709858&r1=1709857&r2=1709858&view=diff
==============================================================================
--- uima/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/ComposedRuleElementMatch.java (original)
+++ uima/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/rule/ComposedRuleElementMatch.java Wed Oct 21 14:53:26 2015
@@ -198,7 +198,10 @@ public class ComposedRuleElementMatch ex
         if (value != null) {
           List<RuleElementMatch> newValue = new ArrayList<RuleElementMatch>();
           newValue.addAll(value);
-          newValue.set(newValue.size() - 1, extendedContainerMatch);
+          if(!newValue.isEmpty()) {
+            // there was no match
+            newValue.set(newValue.size() - 1, extendedContainerMatch);
+          }
           newMap.put(extendedContainerMatch.getRuleElement(), newValue);
         }
       } else {