Project

General

Profile

« Previous | Next » 

Revision fd07b3aa

Added by Andreas Kohlbecker over 2 years ago

avoiding NPEs in loadTreeBranch methods

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/ClassificationServiceImpl.java
280 280
        TaxonNode node = taxonNodeService.find(nodeUuid);
281 281
        if(node == null){
282 282
            logger.warn("The specified taxon is not found in the given tree.");
283
            return null;
283
            return new ArrayList<>(0);
284 284
        }else if (subtree != null && !node.isDescendant(subtree)){
285 285
            //TODO handle as exception? E.g. FilterException, AccessDeniedException?
286 286
            logger.warn("The specified taxon is not found for the given subtree.");
287
            return null;
287
            return new ArrayList<>(0);
288 288
        }
289 289

  
290 290
        return loadTreeBranch(node, subtree, baseRank, includeUnpublished, propertyPaths);

Also available in: Unified diff