FasterXML / jackson-annotations

Core annotations (annotations that only depend on jackson-core) for Jackson data processor
https://github.com/FasterXML/jackson
Apache License 2.0
1.03k stars 330 forks source link

Allow repeated calls to `SimpleObjectIdResolver.bindItem()` for same mapping #180

Closed cowtowncoder closed 3 years ago

cowtowncoder commented 3 years ago

(note: work-around for https://github.com/FasterXML/jackson-dataformats-text/issues/231)

Looks like there are cases where it would be useful to allow multiple calls to adding same mapping for "object-id -> instance" mapping. While ideally calls should not be repeated, it seems that guaranteeing this gets more complicated with native object ids; and in case of YAML with need to location-shift Object Id as well. Since checking for duplicates is already made this should be easy enough to do.