Project

General

Profile

Actions

bug #6045

closed

NPE when using TaxonNaturalComparator

Added by Patrick Plitzner over 6 years ago. Updated over 6 years ago.

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

50%

Estimated time:
Severity:
normal
Found in Version:

Description

When sorting a taxon hierarchy like the following:

    /*
     * Classification
     *  * Abies
     *  `- Abies alba
     *  * Pinus
     *  `- Pinus pampa
     */

the comparator throws an NPE when sorting Abies alba and Pinus pampa.

Actions #2

Updated by Patrick Plitzner over 6 years ago

  • Assignee changed from Patrick Plitzner to Katja Luther

The NPE should be fixed with the attached revision. But I am not sure what the correct natural ordering of taxa looks like.
@Katja: Could you implement the missing check for the correct order in the test eu.etaxonomy.cdm.api.service.TaxonNodeServiceImplTest.testCompareNaturalOrder()?

Actions #4

Updated by Katja Luther over 6 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50

Applied in changeset edit-svn|r28904.

Actions #5

Updated by Katja Luther over 6 years ago

  • Assignee changed from Katja Luther to Patrick Plitzner

please review, the sort order should depend on the sortindex of the taxonnode

Actions #6

Updated by Patrick Plitzner over 6 years ago

  • Status changed from Resolved to Closed
  • Assignee changed from Patrick Plitzner to Katja Luther
Actions #7

Updated by Andreas Müller over 6 years ago

  • Category changed from cdm to cdmlib
Actions

Also available in: Atom PDF