Skip to content

Commit

Permalink
Revert "Double deserialization"
Browse files Browse the repository at this point in the history
This reverts commit ee8d752.
  • Loading branch information
girarda committed Feb 23, 2022
1 parent ee8d752 commit 213f47a
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,19 +60,9 @@ protected List<JsonNode> retrieveRecords(final TestDestinationEnv env,
final String namespace,
final JsonNode streamSchema)
throws Exception {
final List<JsonNode> records = retrieveRecordsFromTable(namingResolver.getRawTableName(streamName), namespace);
return records
return retrieveRecordsFromTable(namingResolver.getRawTableName(streamName), namespace)
.stream()
.map(j -> {
final String text = j.get(JavaBaseConstants.COLUMN_NAME_DATA).asText();
final JsonNode deserialized = Jsons.deserialize(text);
if (deserialized.isTextual()) {
final JsonNode d = Jsons.deserialize(deserialized.asText());
return d;
} else {
return deserialized;
}
})
.map(j -> Jsons.deserialize(j.get(JavaBaseConstants.COLUMN_NAME_DATA).asText()))
.collect(Collectors.toList());
}

Expand Down

0 comments on commit 213f47a

Please sign in to comment.