ref #7680: fix NPE for excluded notes
authorKatja Luther <k.luther@bgbm.org>
Tue, 28 Aug 2018 11:38:36 +0000 (13:38 +0200)
committerKatja Luther <k.luther@bgbm.org>
Tue, 28 Aug 2018 11:38:36 +0000 (13:38 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/classification/TaxonNodeDetailElement.java

index efa6b976c523debda9b72c14a1a034677a32a4a8..ed0b26d4a960585ca63d81c529fbfa0eeddd6d9e 100644 (file)
@@ -9,12 +9,16 @@
 
 package eu.etaxonomy.taxeditor.ui.section.classification;
 
+import java.util.HashMap;
+
 import org.apache.commons.lang.StringUtils;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Text;
 
 import eu.etaxonomy.cdm.common.CdmUtils;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
+import eu.etaxonomy.cdm.model.common.Language;
+import eu.etaxonomy.cdm.model.common.LanguageString;
 import eu.etaxonomy.cdm.model.metadata.CdmPreference;
 import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
 import eu.etaxonomy.cdm.model.name.TaxonName;
@@ -177,7 +181,7 @@ public class TaxonNodeDetailElement extends AbstractCdmDetailElement<ITaxonTreeN
                }else{
                    checkbox_excluded = formFactory.createCheckbox(formElement,
                     "Taxon is excluded", false, style);
-                   multiLanguageTextExcludedNotes = formFactory.createMultiLanguageTextElement(formElement, "Excluded Notes", null, 50, style);
+                   multiLanguageTextExcludedNotes = formFactory.createMultiLanguageTextElement(formElement, "Excluded Notes", new HashMap<Language, LanguageString>(), 50, style);
             multiLanguageTextExcludedNotes.setEnabled(false);
                }
                if (!isCreateNew()){