From 951889781cf258d76a3d41d50c5daf0c8cfeb6cf Mon Sep 17 00:00:00 2001 From: Dario Date: Fri, 16 Aug 2024 19:33:34 +0200 Subject: [PATCH] fix resource removal in annotation polisher --- src/main/java/edu/ucsd/sbrg/polishing/AnnotationPolisher.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/edu/ucsd/sbrg/polishing/AnnotationPolisher.java b/src/main/java/edu/ucsd/sbrg/polishing/AnnotationPolisher.java index 6932772..0a07216 100644 --- a/src/main/java/edu/ucsd/sbrg/polishing/AnnotationPolisher.java +++ b/src/main/java/edu/ucsd/sbrg/polishing/AnnotationPolisher.java @@ -50,8 +50,9 @@ public void polish(Annotation annotation) { resources.add(resource); } } + // Remove all existing resources from the CV Term. - for (int i = 0; i < term.getResourceCount(); i++) { + for (int i = term.getResourceCount() -1; i >= 0 ; i--) { term.removeResource(i); } // Add the updated set of resources, sorted alphabetically, back to the CV Term.