Skip to content

Commit bd698d8

Browse files
committed
use properties instead of fields
1 parent c2dde78 commit bd698d8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/com/arpnetworking/configuration/jackson/JsonNodeMergingSource.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,7 @@ private static JsonNode merge(final JsonNode target, final JsonNode source) {
7575
// the target node. Any unmatched fields from the source node are
7676
// simply added to the target node; this requires a deep copy
7777
// since subsequent merges may modify it.
78-
final Iterator<Map.Entry<String, JsonNode>> iterator = source.fields();
79-
while (iterator.hasNext()) {
80-
final Map.Entry<String, JsonNode> sourceFieldEntry = iterator.next();
78+
for (final Map.Entry<String, JsonNode> sourceFieldEntry : source.properties()) {
8179
final JsonNode targetFieldValue = target.get(sourceFieldEntry.getKey());
8280
if (targetFieldValue != null) {
8381
// Recursively merge the source field value into the target

0 commit comments

Comments
 (0)