- show infraspecific taxa in Palmweb theme only if there are any
authorPatric Plitzner <p.plitzner@bgbm.org>
Tue, 29 Apr 2014 12:19:15 +0000 (12:19 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Tue, 29 Apr 2014 12:19:15 +0000 (12:19 +0000)
 - fixed output (taxon and NOT taxa if only one sub species present)

cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/taxon/ClassificationDaoHibernateImpl.java

index 933824709f00f35d2875b9587e79369f71db72a5..25a4eb402a7b5cc4335d777554abccf80d7b8eaa 100644 (file)
@@ -123,6 +123,10 @@ public class ClassificationDaoHibernateImpl extends IdentifiableDaoBase<Classifi
 \r
         @SuppressWarnings("unchecked")\r
         List<TaxonNode> result = query.list();\r
+        //check if array is "empty" (not containing null objects)\r
+        if(!result.isEmpty() && result.iterator().next()==null){\r
+               return java.util.Collections.emptyList();\r
+        }\r
         defaultBeanInitializer.initializeAll(result, propertyPaths);\r
         return result;\r
     }\r