Skip to content

Commit

Permalink
fix changes to non string fields beeing displayed as null in Json Dif…
Browse files Browse the repository at this point in the history
…f View
  • Loading branch information
patschuh committed Jul 5, 2022
1 parent e5292b2 commit 7cb3dd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Expand Up @@ -10,7 +10,7 @@ plugins {
}

group = 'at.esque.kafka'
version = '2.2.0'
version = '2.2.1'

repositories {
mavenCentral()
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/at/esque/kafka/JsonUtils.java
Expand Up @@ -166,10 +166,10 @@ private static void removeNode(JsonTreeItem path, JsonNode jsonNode) {

private static void replaceValue(JsonTreeItem path, JsonNode jsonNode) {
if (jsonNode.get("value").isNull()) {
path.setPropertyValue((path.getPropertyValue() == null ? "" : path.getPropertyValue()) + " -> " + jsonNode.get("value").textValue());
path.setPropertyValue((path.getPropertyValue() == null ? "" : path.getPropertyValue()) + " -> " + ((jsonNode.get("value") instanceof TextNode)?jsonNode.get("value").textValue():jsonNode.get("value")));
applyChangeTypeAndPropagateToChilds(path, "remove");
} else {
path.setPropertyValue(path.getPropertyValue() + " -> " + jsonNode.get("value").textValue());
path.setPropertyValue(path.getPropertyValue() + " -> " + ((jsonNode.get("value") instanceof TextNode)?jsonNode.get("value").textValue():jsonNode.get("value")));
path.setPropertyChangedType(jsonNode.get("op").textValue());
}
}
Expand Down

0 comments on commit 7cb3dd3

Please sign in to comment.