Skip to content

Commit 2103d31

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

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import com.google.common.collect.Lists;
2525
import net.sf.oval.constraint.NotNull;
2626

27-
import java.util.Iterator;
2827
import java.util.List;
2928
import java.util.Map;
3029
import java.util.Optional;
@@ -75,9 +74,7 @@ private static JsonNode merge(final JsonNode target, final JsonNode source) {
7574
// the target node. Any unmatched fields from the source node are
7675
// simply added to the target node; this requires a deep copy
7776
// 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();
77+
for (final Map.Entry<String, JsonNode> sourceFieldEntry : source.properties()) {
8178
final JsonNode targetFieldValue = target.get(sourceFieldEntry.getKey());
8279
if (targetFieldValue != null) {
8380
// Recursively merge the source field value into the target

0 commit comments

Comments
 (0)