Skip to content

Commit 97a7b55

Browse files
author
Alex Soto
committed
Change if/else to a ternary.
1 parent e7d4138 commit 97a7b55

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/main/java/com/github/fge/jsonpatch/mergepatch/ObjectMergePatch.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,7 @@ public JsonNode apply(final JsonNode input)
8080
* * if it is an ObjectMergePatch, we get back here; the value will
8181
* be replaced with a JSON Object anyway before being processed.
8282
*/
83-
if(ret.get(key) == null)
84-
{
85-
value = NullNode.getInstance();
86-
}
87-
else
88-
{
89-
value = ret.get(key);
90-
}
83+
value = ret.get(key) == null ? NullNode.getInstance() : ret.get(key);
9184

9285
ret.put(key, entry.getValue().apply(value));
9386
}

0 commit comments

Comments
 (0)