diff --git a/src/main/java/com/smartharvester/service/MappingService.java b/src/main/java/com/smartharvester/service/MappingService.java index 0cf20f11362653b27b1d352ea8533738387ba098..30ecb762e97e0a89daf79026480b3532515b14d8 100644 --- a/src/main/java/com/smartharvester/service/MappingService.java +++ b/src/main/java/com/smartharvester/service/MappingService.java @@ -233,7 +233,9 @@ public class MappingService { values.add(value); propertyValueMap.replace(path.getProperty(), values); } else { - propertyValueMap.put(path.getProperty(), List.of(value)); + List<String> values = new ArrayList<>(); + values.add(value); + propertyValueMap.put(path.getProperty(), values); } break; } else if (jsonT.optString(list.get(i)) != null && jsonT.has(list.get(i))) { @@ -243,7 +245,9 @@ public class MappingService { values.add(value); propertyValueMap.replace(path.getProperty(), values); } else { - propertyValueMap.put(path.getProperty(), List.of(value)); + List<String> values = new ArrayList<>(); + values.add(value); + propertyValueMap.put(path.getProperty(), values); } break; } else { @@ -259,7 +263,9 @@ public class MappingService { values.add(value); propertyValueMap.replace(path.getProperty(), values); } else { - propertyValueMap.put(path.getProperty(), List.of(value)); + List<String> values = new ArrayList<>(); + values.add(value); + propertyValueMap.put(path.getProperty(), values); } }