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.