Skip to content
Snippets Groups Projects
Commit e50c3ad9 authored by OZGCloud's avatar OZGCloud
Browse files

SCCON fix NPE when label is missing

parent b9ad3c74
No related branches found
No related tags found
No related merge requests found
package de.ozgcloud.eingang.enterprise.entry; package de.ozgcloud.eingang.enterprise.entry;
import java.util.Collections;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -54,11 +56,19 @@ public interface FormDataMapper { ...@@ -54,11 +56,19 @@ public interface FormDataMapper {
} }
default Map<String, Object> mapFormField(EntryFormDataField field) { default Map<String, Object> mapFormField(EntryFormDataField field) {
return Map.of(LABEL_KEY, field.getLabel(), VALUE_KEY, field.getValue()); var map = new HashMap<String, Object>();
map.put(LABEL_KEY, field.getLabel());
map.put(VALUE_KEY, field.getValue());
return Collections.unmodifiableMap(map);
} }
default Map<String, Object> mapSubForm(EntryFormDataSubForm subForm) { default Map<String, Object> mapSubForm(EntryFormDataSubForm subForm) {
return Map.of(LABEL_KEY, subForm.getLabel(), VALUE_KEY, mapFormItems(subForm.getFormItems())); var map = new HashMap<String, Object>();
map.put(LABEL_KEY, subForm.getLabel());
map.put(VALUE_KEY, mapFormItems(subForm.getFormItems()));
return Collections.unmodifiableMap(map);
} }
default PostfachAddress map(de.ozgcloud.eingang.enterprise.entry.EntryData.PostfachAddress address) { default PostfachAddress map(de.ozgcloud.eingang.enterprise.entry.EntryData.PostfachAddress address) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment