fix NPE when no filter or validator applied

This commit is contained in:
Jonathan Shook
2023-09-10 19:17:45 -05:00
parent 17fa8500ab
commit 7b9f4389b8
2 changed files with 4 additions and 4 deletions

View File

@@ -122,8 +122,8 @@ public class Annotators {
}
public static synchronized void recordAnnotation(Annotation annotation) {
annotation.applyLabelFunction(filter);
annotation.applyLabelFunction(validator);
if (filter!=null) annotation.applyLabelFunction(filter);
if (validator!=null) annotation.applyLabelFunction(validator);
// sanity check here first
annotation.getLabels();
for (Annotator annotator : getAnnotators()) {