task #9567
closedUnify HomotypicGroupTaxonComparator and HomotypicGroupNameComparator
50%
Description
Both classes have mostly the same code so they are very redundant. HGNameComparator seems to be an adapted copy of HGTaxonComparator.
Related issues
Updated by Andreas Müller about 3 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 50
Applied in changeset cdmlib|8432293fbc9496c0b4c50bda3516ef9e0ac3b984.
Updated by Andreas Müller about 3 years ago
- Related to bug #9566: Handle nomenclatural standing correctly in cdmlight / sorting algorithms added
Updated by Andreas Müller about 3 years ago
- Assignee changed from Andreas Müller to Katja Luther
please review
Updated by Katja Luther about 3 years ago
- Status changed from Resolved to Feedback
- Assignee changed from Katja Luther to Andreas Müller
In handleSameBasionym a return was missing. After fixing that the result is correct.
But maybe the NPE should be avoid if no taxonBases available?
Updated by Andreas Müller about 3 years ago
Katja Luther wrote:
In handleSameBasionym a return was missing. After fixing that the result is correct.
But maybe the NPE should be avoid if no taxonBases available?
Which NPE do you mean? Which line?
Updated by Katja Luther about 3 years ago
Andreas Müller wrote:
Katja Luther wrote:
In handleSameBasionym a return was missing. After fixing that the result is correct.
But maybe the NPE should be avoid if no taxonBases available?Which NPE do you mean? Which line?
if in compareNames the value of compareResult == 0 the taxa should be compared, but if there are no taxa a NPE is thrown. (line 142)
Updated by Katja Luther about 3 years ago
Katja Luther wrote:
Andreas Müller wrote:
Katja Luther wrote:
In handleSameBasionym a return was missing. After fixing that the result is correct.
But maybe the NPE should be avoid if no taxonBases available?Which NPE do you mean? Which line?
if in compareNames the value of compareResult == 0 the taxa should be compared, but if there are no taxa a NPE is thrown. (line 142)
for example the comparison of Opuntia ×rubiflora Davidson and Opuntia rubiflora Davidson returns 0 and then the taxa should be compared. Also that the comparison results 0 is not correct?
Updated by Katja Luther about 3 years ago
I would add another comparison if the first two comparisons return 0 to compare the not normalized titleCache, do you agree?
Updated by Andreas Müller about 3 years ago
- Status changed from Feedback to Resolved
Applied in changeset cdmlib|e0c610f10302b0c755f509a33bd3df645077ea69.
Updated by Andreas Müller about 3 years ago
- Status changed from Resolved to Feedback
I fixed the potetial NPE and adapted the compare to include hybrid sign if names do not differ in any other part.
Updated by Andreas Müller about 3 years ago
- Status changed from Feedback to Resolved
- Assignee changed from Andreas Müller to Katja Luther
The mentioned issues should be fixed.
Maybe you can still add some tests for HomotypicGroupNameComparator which explicitly handle specific issues for name comparison so the HomotypicGroupNameComparator is also covered by tests. Especially the NPE case should be covered.
Updated by Katja Luther about 3 years ago
- Status changed from Resolved to Closed
- Assignee changed from Katja Luther to Andreas Müller
this issue seems to be fixed. add a new ticket for the tests.
Updated by Katja Luther about 3 years ago
- Related to task #9576: Add tests for homotypic group name comparator added