From 20f8e24aa6d3043914bdea7a517e69a89948cf54 Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Sun, 28 Jan 2024 19:29:27 +0100 Subject: [PATCH] #4476 - Exception while rendering recommendations - If a is already null, no need to try and comparing against its end position --- .../ukp/inception/recommendation/util/OverlapIterator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/util/OverlapIterator.java b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/util/OverlapIterator.java index 4f685518e89..efc738f4982 100644 --- a/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/util/OverlapIterator.java +++ b/inception/inception-recommendation/src/main/java/de/tudarmstadt/ukp/inception/recommendation/util/OverlapIterator.java @@ -91,7 +91,7 @@ else if (ib.hasNext()) { // Step to the next B from the source list LOG.trace("Stepping B from source Bs"); b = ib.next(); - if (b.getBegin() > a.getEnd()) { + if (a != null && b.getBegin() > a.getEnd()) { // All remaining b's are beyond the end of the a's and won't overlap a = null; }