Skip to content

Commit

Permalink
Make ArrayNode.elements() return ListIterator() (#4692)
Browse files Browse the repository at this point in the history
  • Loading branch information
JooHyukKim authored Sep 11, 2024
1 parent 97d37dd commit d6e3b20
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
3 changes: 3 additions & 0 deletions release-notes/VERSION-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ Project: jackson-databind
#2977: Incompatible `FAIL_ON_MISSING_PRIMITIVE_PROPERTIES` and
field level `@JsonProperty`
(reported by @GeorgiPetkov)
#3120: Return `ListIterator` from `ArrayNode.elements()`
(requested by @ludgerb)
(fix by Joo-Hyuk K)
#3241: `constructorDetector` seems to invalidate `defaultSetterInfo`
for nullability
(reported by @joca-bt)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,16 @@ public int size() {
@Override // since 2.10
public boolean isEmpty() { return _children.isEmpty(); }

/**
* {@inheritDoc}
*<p>
* NOTE: actual underlying implementation returns {@link java.util.ListIterator}
* from {@link java.util.List#listIterator()} that contains elements, since Jackson 2.18
* (before was only generic {@link java.util.Iterator}).
*/
@Override
public Iterator<JsonNode> elements() {
return _children.iterator();
return _children.listIterator();
}

@Override
Expand Down

0 comments on commit d6e3b20

Please sign in to comment.