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/16 13:26:25 UTC
svn commit: r1708962 -
/uima/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/TrieAction.java
Author: pkluegl
Date: Fri Oct 16 11:26:25 2015
New Revision: 1708962
URL: http://svn.apache.org/viewvc?rev=1708962&view=rev
Log:
UIMA-4640
- avoid npe in TRIE
Modified:
uima/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/TrieAction.java
Modified: uima/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/TrieAction.java
URL: http://svn.apache.org/viewvc/uima/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/TrieAction.java?rev=1708962&r1=1708961&r2=1708962&view=diff
==============================================================================
--- uima/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/TrieAction.java (original)
+++ uima/ruta/trunk/ruta-core/src/main/java/org/apache/uima/ruta/action/TrieAction.java Fri Oct 16 11:26:25 2015
@@ -92,16 +92,17 @@ public class TrieAction extends Abstract
String ignoreCharValue = ignoreChar.getStringValue(parent, match, element, stream);
RutaWordList wl = list.getList(parent);
- Collection<AnnotationFS> found = wl.find(stream, typeMap, ignoreCaseValue, ignoreLengthValue,
- editValue, distanceValue, ignoreCharValue);
+ if (wl != null) {
+ Collection<AnnotationFS> found = wl.find(stream, typeMap, ignoreCaseValue, ignoreLengthValue,
+ editValue, distanceValue, ignoreCharValue);
- if (found != null) {
- for (AnnotationFS annotation : found) {
- stream.addAnnotation(annotation, match);
- stream.getCas().addFsToIndexes(annotation);
+ if (found != null) {
+ for (AnnotationFS annotation : found) {
+ stream.addAnnotation(annotation, match);
+ stream.getCas().addFsToIndexes(annotation);
+ }
}
}
-
}
public WordListExpression getList() {