Skip to content

Commit

Permalink
Fix compilation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Dec 31, 2024
1 parent 2232f83 commit edb846e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,9 @@ public static AvroFieldReader createDefaulter(String name,
return new ScalarDefaults.StringDefaults(name, defaultAsNode.asText());
case START_OBJECT:
{
Iterator<Map.Entry<String,JsonNode>> it = defaultAsNode.fields();
List<AvroFieldReader> readers = new ArrayList<>();
while (it.hasNext()) {
Map.Entry<String,JsonNode> entry = it.next();
String propName = entry.getKey();
readers.add(createDefaulter(propName, entry.getValue()));
for (Map.Entry<String,JsonNode> entry : defaultAsNode.properties()) {
readers.add(createDefaulter(entry.getKey(), entry.getValue()));
}
return StructDefaults.createObjectDefaults(name, readers);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void testSimple() throws Exception
assertTrue(result.isObject());

ObjectNode main = (ObjectNode) result;
assertEquals("Image", main.propertyNames().next());
assertEquals("Image", main.propertyNames().iterator().next());
JsonNode ob = main.iterator().next();
assertType(ob, ObjectNode.class);
ObjectNode imageMap = (ObjectNode) ob;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public void testSimple() throws Exception
assertTrue(result.isObject());

ObjectNode main = (ObjectNode) result;
assertEquals("Image", main.propertyNames().next());
assertEquals("Image", main.propertyNames().iterator().next());
JsonNode ob = main.iterator().next();
assertType(ob, ObjectNode.class);
ObjectNode imageMap = (ObjectNode) ob;
Expand Down

0 comments on commit edb846e

Please sign in to comment.