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 2020/10/22 20:16:16 UTC

[uima-ruta] branch UIMA-6281-uimaFIT-coveredBy updated: UIMA-6281: fix method for null arguments

This is an automated email from the ASF dual-hosted git repository.

pkluegl pushed a commit to branch UIMA-6281-uimaFIT-coveredBy
in repository https://gitbox.apache.org/repos/asf/uima-ruta.git


The following commit(s) were added to refs/heads/UIMA-6281-uimaFIT-coveredBy by this push:
     new 4d2b15e  UIMA-6281: fix method for null arguments
4d2b15e is described below

commit 4d2b15e675ae8c25d775c1504831489b7b8e916f
Author: Peter Klügl <pe...@averbis.com>
AuthorDate: Thu Oct 22 22:15:48 2020 +0200

    UIMA-6281: fix method for null arguments
---
 ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java b/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java
index 1cdd40c..08a53d8 100644
--- a/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java
+++ b/ruta-core/src/main/java/org/apache/uima/ruta/RutaStream.java
@@ -1139,6 +1139,10 @@ public class RutaStream {
   public List<AnnotationFS> getAnnotationsInWindow(Type type, AnnotationFS windowAnnotation,
           boolean sensitiveToVisibility) {
 
+    if (type == null || windowAnnotation == null) {
+      return Collections.emptyList();
+    }
+
     List<AnnotationFS> result = new LinkedList<>();
 
     if (cas.getTypeSystem().subsumes(type, windowAnnotation.getType())) {