Project

General

Profile

Actions

task #9567

closed

Unify HomotypicGroupTaxonComparator and HomotypicGroupNameComparator

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

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

50%

Estimated time:
Severity:
normal

Description

Both classes have mostly the same code so they are very redundant. HGNameComparator seems to be an adapted copy of HGTaxonComparator.


Related issues

Related to EDIT - bug #9566: Handle nomenclatural standing correctly in cdmlight / sorting algorithmsClosedAndreas Müller

Actions
Related to EDIT - task #9576: Add tests for homotypic group name comparatorRejectedKatja Luther

Actions
Actions #1

Updated by Andreas Müller over 1 year ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50
Actions #2

Updated by Andreas Müller over 1 year ago

  • Related to bug #9566: Handle nomenclatural standing correctly in cdmlight / sorting algorithms added
Actions #3

Updated by Andreas Müller over 1 year ago

  • Assignee changed from Andreas Müller to Katja Luther

please review

Actions #4

Updated by Katja Luther over 1 year 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?

Actions #5

Updated by Andreas Müller over 1 year 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?

Actions #6

Updated by Katja Luther over 1 year 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)

Actions #7

Updated by Katja Luther over 1 year 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?

Actions #8

Updated by Katja Luther over 1 year ago

I would add another comparison if the first two comparisons return 0 to compare the not normalized titleCache, do you agree?

Actions #9

Updated by Andreas Müller over 1 year ago

  • Status changed from Feedback to Resolved
Actions #10

Updated by Andreas Müller over 1 year 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.

Actions #11

Updated by Andreas Müller over 1 year 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.

Actions #12

Updated by Katja Luther over 1 year 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.

Actions #13

Updated by Katja Luther over 1 year ago

  • Related to task #9576: Add tests for homotypic group name comparator added
Actions

Also available in: Atom PDF