Skip to content

Commit 7026ad7

Browse files
javier-godoypaodb
authored andcommitted
fix: fix JsonNode object downcast
1 parent c66fa8e commit 7026ad7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/flowingcode/vaadin/jsonmigration/JsonMigrationHelper25.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ private static JsonValue convertToJsonValue(JsonNode jsonNode) {
7474
switch (jsonNode.getNodeType()) {
7575
case OBJECT:
7676
JsonObject jsonObject = Json.createObject();
77-
JsonObject source = (JsonObject)jsonNode;
78-
for (String key : source.keys()) {
77+
ObjectNode source = (ObjectNode) jsonNode;
78+
for (String key : source.propertyNames()) {
7979
jsonObject.put(key, convertToJsonValue(source.get(key)));
8080
}
8181
return jsonObject;

0 commit comments

Comments
 (0)