Skip to content

Commit 3d4c040

Browse files
authored
Add copy-constructor for MappingIterator (#5069)
1 parent 07175da commit 3d4c040

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Diff for: src/main/java/com/fasterxml/jackson/databind/MappingIterator.java

+8
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,14 @@ protected MappingIterator(JavaType type, JsonParser p, DeserializationContext ct
162162
}
163163
}
164164

165+
/**
166+
* Copy-constructor that sub-classes can use when creating new instances
167+
* by fluent-style construction
168+
*/
169+
protected MappingIterator(MappingIterator<T> src) {
170+
this(src._type, src._parser, src._context, src._deserializer, src._closeParser, src._updatedValue);
171+
}
172+
165173
/**
166174
* Method for getting an "empty" iterator instance: one that never
167175
* has more values; may be freely shared.

0 commit comments

Comments
 (0)