-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Milestone
Description
Given a class of this form, the documentation suggests that value
should be created as a LinkedList
, however it is always an ArrayList
. Furthermore, if I modify the @JsonDeserialize
annotation with incorrect values (e.g. as = HashMap.class
) it does not change behavior.
public final class Wrapper {
private final List<String> value;
@JsonCreator
public Wrapper(@JsonDeserialize(as = LinkedList.class) List<String> value) {
this.value = value;
}
@JsonValue
public List<String> getValue() {
return value;
}
}
If I expect an object with a property by using a @JsonProperty
annotation, the @JsonDeserialize
annotation does work as expected.
Simple repro here:
https://github.com/cakofony/jackson-jsoncreator-deserializeas-repro
Test class is located here
Happy to provide additional info.
Thanks!
Metadata
Metadata
Assignees
Labels
No labels