From 6cddf6c50d5bdca84f0cbc9f65cc1767b5b415f7 Mon Sep 17 00:00:00 2001
From: Patric Plitzner
Date: Tue, 29 Apr 2014 12:19:15 +0000
Subject: [PATCH] - show infraspecific taxa in Palmweb theme only if there are
any - fixed output (taxon and NOT taxa if only one sub species present)
---
.../dao/hibernate/taxon/ClassificationDaoHibernateImpl.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/taxon/ClassificationDaoHibernateImpl.java b/cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/taxon/ClassificationDaoHibernateImpl.java
index 933824709f..25a4eb402a 100644
--- a/cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/taxon/ClassificationDaoHibernateImpl.java
+++ b/cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/taxon/ClassificationDaoHibernateImpl.java
@@ -123,6 +123,10 @@ public class ClassificationDaoHibernateImpl extends IdentifiableDaoBase result = query.list();
+ //check if array is "empty" (not containing null objects)
+ if(!result.isEmpty() && result.iterator().next()==null){
+ return java.util.Collections.emptyList();
+ }
defaultBeanInitializer.initializeAll(result, propertyPaths);
return result;
}
--
2.34.1