Null map values (#12018)

This commit is contained in:
Nidhi 2022-03-21 15:37:04 +05:30 committed by GitHub
parent 479441ffba
commit dddb85abbf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,11 +178,11 @@ public class DatabaseChangelog2 {
.forEach(k -> { .forEach(k -> {
if (k != null) { if (k != null) {
final Object oldValue = unpublishedFormData.get(k); final Object oldValue = unpublishedFormData.get(k);
unpublishedFormData.put(k, new HashMap<>(Map.of( final HashMap<String, Object> map = new HashMap<>();
"data", oldValue, map.put("data", oldValue);
"componentData", oldValue, map.put("componentData", oldValue);
"viewType", "component" map.put("viewType", "component");
))); unpublishedFormData.put(k, map);
} }
}); });
@ -232,11 +232,11 @@ public class DatabaseChangelog2 {
.forEach(k -> { .forEach(k -> {
if (k != null) { if (k != null) {
final Object oldValue = publishedFormData.get(k); final Object oldValue = publishedFormData.get(k);
publishedFormData.put(k, new HashMap<>(Map.of( final HashMap<String, Object> map = new HashMap<>();
"data", oldValue, map.put("data", oldValue);
"componentData", oldValue, map.put("componentData", oldValue);
"viewType", "component" map.put("viewType", "component");
))); publishedFormData.put(k, map);
} }
}); });
@ -310,12 +310,11 @@ public class DatabaseChangelog2 {
return; return;
} }
if (key != null) { if (key != null) {
formDataMap.put(key, final HashMap<String, Object> map = new HashMap<>();
new HashMap<>(Map.of( map.put("data", value);
"data", value, map.put("componentData", value);
"componentData", value, map.put("viewType", "component");
"viewType", "component" formDataMap.put(key, map);
)));
} }
} }