diff --git a/src/main/java/de/sub/goobi/forms/ProzesskopieForm.java b/src/main/java/de/sub/goobi/forms/ProzesskopieForm.java index 7bac4c2bf..b1769361e 100644 --- a/src/main/java/de/sub/goobi/forms/ProzesskopieForm.java +++ b/src/main/java/de/sub/goobi/forms/ProzesskopieForm.java @@ -459,25 +459,15 @@ private AdditionalField readAdditionalFieldConfiguration(HierarchicalConfigurati List parameterList = item.configurationsAt("select"); /* Children durchlaufen und SelectItems erzeugen */ - if (!parameterList.isEmpty()) { - if (item.getBoolean("@multiselect", true)) { // NOSONAR - fa.setMultiselect(true); - } else { - fa.setMultiselect(false); - } - fa.setSelectList(new ArrayList<>()); - } + fa.setMultiselect(item.getBoolean("@multiselect", true)); if (parameterList.size() == 1) { fa.setWert(parameterList.get(0).getString(".")); fa.setMultiselect(false); - } - - for (HierarchicalConfiguration hc : parameterList) { - String svalue = hc.getString("@label"); - - String sid = hc.getString("."); - fa.getSelectList().add(new SelectItem(sid, svalue, null)); + } else if (!parameterList.isEmpty()) { + fa.setSelectList(parameterList.stream() + .map(hc -> new SelectItem(hc.getString("@label"), hc.getString("."), null)) + .toList()); } String vocabularyTitle = item.getString("@vocabulary");