Skip to content

Commit

Permalink
add null key check to PropertiesJson (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
eemhu authored Feb 18, 2025
1 parent c544490 commit 8066d6f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/teragrep/nlf_01/PropertiesJson.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ public JsonObject toJsonObject() {

if (!props.isStub()) {
props.asMap().forEach((k, v) -> {
if (v != null) {
if (k != null && v != null) {
builder.add(k, String.valueOf(v));
}
else {
else if (k != null) {
builder.addNull(k);
}
});
Expand Down

0 comments on commit 8066d6f

Please sign in to comment.