- fixed NPE (#4883)
authorPatric Plitzner <p.plitzner@bgbm.org>
Tue, 26 May 2015 08:59:50 +0000 (08:59 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Tue, 26 May 2015 08:59:50 +0000 (08:59 +0000)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/DescriptionHelper.java

index 658b72c31738fee7aafe23666f4bdb09fd9fbdc5..dd393a39dbbf7776a4c9b8dddf8f78fc8d24f16d 100644 (file)
@@ -422,7 +422,7 @@ public class DescriptionHelper {
                }
                else if(element instanceof CategoricalData){
                        String categoricalDataText = getCategoricalDataText((CategoricalData) element);
-                       if(categoricalDataText.isEmpty()){
+                       if(categoricalDataText==null || categoricalDataText.isEmpty()){
                            categoricalDataText = noLabelString;
                        }
             return categoricalDataText;
@@ -438,7 +438,7 @@ public class DescriptionHelper {
                }
                else if (element instanceof QuantitativeData) {
                        String quantitativeDataText = getQuantitativeDataText((QuantitativeData) element);
-                       if(quantitativeDataText.isEmpty()){
+                       if(quantitativeDataText==null || quantitativeDataText.isEmpty()){
                 quantitativeDataText = noLabelString;
                        }
             return quantitativeDataText;