Skip to content

Commit

Permalink
add null checks for all combinations in PropertiesJson (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
eemhu authored Feb 18, 2025
1 parent 8066d6f commit 8934659
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/com/teragrep/nlf_01/PropertiesJson.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ public JsonObject toJsonObject() {
else if (k != null) {
builder.addNull(k);
}
else if (v != null) {
builder.add("null", String.valueOf(v));
}
else {
builder.addNull("null");
}
});
}

Expand Down

0 comments on commit 8934659

Please sign in to comment.