From 897ab6d1e93a905bc513717a42f0904c557645b1 Mon Sep 17 00:00:00 2001
From: Patrick Plitzner
Date: Thu, 26 Jul 2018 17:09:21 +0200
Subject: [PATCH] Fix possible NoSuchElementException
---
.../eu/etaxonomy/cdm/api/service/DescriptiveDataSetService.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/DescriptiveDataSetService.java b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/DescriptiveDataSetService.java
index a1ea52e1c7..9ed2428dc1 100644
--- a/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/DescriptiveDataSetService.java
+++ b/cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/DescriptiveDataSetService.java
@@ -155,7 +155,7 @@ public class DescriptiveDataSetService
"taxonNodes",
"taxonNodes.classification",
}));
- if(associatedTaxa!=null){
+ if(associatedTaxa!=null && !associatedTaxa.isEmpty()){
//FIXME: what about multiple associated taxa
Set taxonSubtreeFilter = descriptiveDataSet.getTaxonSubtreeFilter();
if(taxonSubtreeFilter!=null && !taxonSubtreeFilter.isEmpty()){
--
2.34.1