fix(#8125): Fix empty values handling in Google sheets
The getOrDefault is not working when there is a key in the map with actual null value. So use Optional.ofNullable and make sure to handle null values and use empty String values instead.
@@ -117,7 +117,8 @@ public class GoogleSheetsUpdateValuesCustomizer implements ComponentProxyCustomi
.entrySet()
.stream()
.filter(specEntry -> !Objects.equals("spreadsheetId", specEntry.getKey()))
- .forEach(specEntry -> rangeValues.add(dataShape.getOrDefault(specEntry.getKey(), "")));
+ .forEach(specEntry -> rangeValues.add(Optional.ofNullable(dataShape.get(specEntry.getKey()))
+ .orElse("")));
values.add(rangeValues);
}
