fix NPE in NameDetailsView Preference processing
authorKatja Luther <k.luther@bgbm.org>
Mon, 30 Sep 2019 07:59:07 +0000 (09:59 +0200)
committerKatja Luther <k.luther@bgbm.org>
Mon, 30 Sep 2019 07:59:07 +0000 (09:59 +0200)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java

index f87a58816444707ee4fb287f004923c8ae1a2e12..2ad4394db109690d553a2f5f02fd8ed8ce1133f8 100644 (file)
@@ -1396,8 +1396,10 @@ public class PreferencesUtil implements IPreferenceKeys {
         Map<String, Boolean> sectionMap = new HashMap<>();
         String[] sectionValues;
         for (String sectionValue: sections){
-            sectionValues = sectionValue.split(":");
-//            sectionMap.put(sectionValues[0], Boolean.valueOf(sectionValues[1]));
+            if (sectionValue.contains(":")){
+                sectionValues = sectionValue.split(":");
+                sectionMap.put(sectionValues[0], Boolean.valueOf(sectionValues[1]));
+            }
         }
         for (Field field: config.getClass().getDeclaredFields()){
             try {