Skip to content

Commit edb846e

Browse files
committed
Fix compilation issues
1 parent 2232f83 commit edb846e

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

avro/src/main/java/tools/jackson/dataformat/avro/deser/AvroFieldDefaulters.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,9 @@ public static AvroFieldReader createDefaulter(String name,
4141
return new ScalarDefaults.StringDefaults(name, defaultAsNode.asText());
4242
case START_OBJECT:
4343
{
44-
Iterator<Map.Entry<String,JsonNode>> it = defaultAsNode.fields();
4544
List<AvroFieldReader> readers = new ArrayList<>();
46-
while (it.hasNext()) {
47-
Map.Entry<String,JsonNode> entry = it.next();
48-
String propName = entry.getKey();
49-
readers.add(createDefaulter(propName, entry.getValue()));
45+
for (Map.Entry<String,JsonNode> entry : defaultAsNode.properties()) {
46+
readers.add(createDefaulter(entry.getKey(), entry.getValue()));
5047
}
5148
return StructDefaults.createObjectDefaults(name, readers);
5249
}

cbor/src/test/java/tools/jackson/dataformat/cbor/mapper/TreeReadViaMapperTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public void testSimple() throws Exception
2626
assertTrue(result.isObject());
2727

2828
ObjectNode main = (ObjectNode) result;
29-
assertEquals("Image", main.propertyNames().next());
29+
assertEquals("Image", main.propertyNames().iterator().next());
3030
JsonNode ob = main.iterator().next();
3131
assertType(ob, ObjectNode.class);
3232
ObjectNode imageMap = (ObjectNode) ob;

smile/src/test/java/tools/jackson/dataformat/smile/mapper/TreeReadViaMapperTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public void testSimple() throws Exception
2626
assertTrue(result.isObject());
2727

2828
ObjectNode main = (ObjectNode) result;
29-
assertEquals("Image", main.propertyNames().next());
29+
assertEquals("Image", main.propertyNames().iterator().next());
3030
JsonNode ob = main.iterator().next();
3131
assertType(ob, ObjectNode.class);
3232
ObjectNode imageMap = (ObjectNode) ob;

0 commit comments

Comments
 (0)