Project

General

Profile

Actions

bug #10198

closed

Termremoval for OrderedTermVocabularies does not work correctly due to incorrect compareTo and orderIndex decrement

Added by Andreas Müller over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Priority14
Category:
cdmlib
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
normal
Found in Version:
Tags:

Description

The termTree in OrderedTermVocabulary identifies entries via compareTo. The compareTo for OrderedTerms in the same vocabulary works via orderIndex.

The removal method first decreases the orderIndex of following terms and therefore creates a duplicate (in terms of comparison) with the term to remove, before calling terms.remove(term). Therefore the wrong term might be removed. This was not so critical as long as there was another bug which prevented the decrement of the the following terms. Since this is fixed and since "equal" terms are not allowed anymore in OrderedTerms this issue becomes critical now.


Related issues

Related to EDIT - feature request #6794: Improve term structureIn ProgressAndreas Müller

Actions
Actions

Also available in: Atom PDF