UIMA-6281: fix method for null arguments
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 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())) {