Skip to content

Commit

Permalink
Remove usages of ObjectNode.put(String, JsonNode) as it is deprecated (
Browse files Browse the repository at this point in the history
  • Loading branch information
racevedoo committed Oct 15, 2022
1 parent d2e95ff commit 425e193
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ public IcebergChangeEventBuilder destination(String destination) {
public IcebergChangeEventBuilder addField(String parentFieldName, String name, String val) {
ObjectNode nestedField = JsonNodeFactory.instance.objectNode();
nestedField.put(name, val);
this.payload.put(parentFieldName, nestedField);
this.payload.set(parentFieldName, nestedField);
return this;
}

public IcebergChangeEventBuilder addField(String parentFieldName, String name, int val) {
ObjectNode nestedField = JsonNodeFactory.instance.objectNode();
nestedField.put(name, val);
this.payload.put(parentFieldName, nestedField);
this.payload.set(parentFieldName, nestedField);
return this;
}

Expand All @@ -62,7 +62,7 @@ public IcebergChangeEventBuilder addField(String parentFieldName, String name, b
nestedField = (ObjectNode) this.payload.get(parentFieldName);
}
nestedField.put(name, val);
this.payload.put(parentFieldName, nestedField);
this.payload.set(parentFieldName, nestedField);
return this;
}

Expand Down

0 comments on commit 425e193

Please sign in to comment.