Project

General

Profile

bug #6045

NPE when using TaxonNaturalComparator

Added by Patrick Plitzner almost 3 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
New
Assignee:
Category:
cdmlib
Target version:
Start date:
08/30/2016
Due date:
% Done:

50%

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.

Associated revisions

Revision 28901 (diff)
Added by Patrick Plitzner almost 3 years ago

ref #6045 Fix NPE for TaxonNaturalComparator
- fix getAncestors() method of taxon node
- added JUnit test

Revision efc96b49 (diff)
Added by Patrick Plitzner almost 3 years ago

ref #6045 Fix NPE for TaxonNaturalComparator
- fix getAncestors() method of taxon node
- added JUnit test

Revision 28904 (diff)
Added by Katja Luther almost 3 years ago

fix #6045: fixing the NaturalOrderComparator and complete the test

Revision 255a28af (diff)
Added by Katja Luther almost 3 years ago

fix #6045: fixing the NaturalOrderComparator and complete the test

Revision 28905 (diff)
Added by Patrick Plitzner almost 3 years ago

ref #6045 Add test for getAncestor()

Revision 97b2fabe (diff)
Added by Patrick Plitzner almost 3 years ago

ref #6045 Add test for getAncestor()

Revision e13674c3 (diff)
Added by Patrick Plitzner almost 3 years ago

ref #6045 some comments and clean up

Revision aa478e85 (diff)
Added by Patrick Plitzner almost 3 years ago

ref #6045 Fix NPE for TaxonNaturalComparator
- fix getAncestors() method of taxon node
- added JUnit test

Revision 889c7e91 (diff)
Added by Katja Luther almost 3 years ago

fix #6045: fixing the NaturalOrderComparator and complete the test

Revision 2f495573 (diff)
Added by Patrick Plitzner almost 3 years ago

ref #6045 Add test for getAncestor()

Revision f3755e6f (diff)
Added by Patrick Plitzner almost 3 years ago

ref #6045 some comments and clean up

History

#2 Updated by Patrick Plitzner almost 3 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()?

#4 Updated by Katja Luther almost 3 years ago

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

Applied in changeset edit-svn|r28904.

#5 Updated by Katja Luther almost 3 years ago

  • Assignee changed from Katja Luther to Patrick Plitzner

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

#6 Updated by Patrick Plitzner almost 3 years ago

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

#7 Updated by Andreas Müller almost 3 years ago

  • Category changed from cdm to cdmlib

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)