Problem deserializing a class with ancestors
danjee opened this issue · 2 comments
danjee commented
Issue deserializing a spring data PageImpl.
I've excluded the legacy afterburner from my dependencies and a deserializer started failing.
My custom class is extending PageImpl which extends Chunk.
@JsonIgnoreProperties(ignoreUnknown = true, value = {"pageable"})
public class RestPage<T> extends PageImpl<T> {
private static final long serialVersionUID = 851236798223548446L;
@JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
public RestPage(
@JsonProperty("content") final List<T> content,
@JsonProperty("page") final int page,
@JsonProperty("size") final int size,
@JsonProperty("totalElements") final long total) {
super(content, PageRequest.of(page, size), total);
}
public RestPage(final Page<T> page) {
super(page.getContent(), page.getPageable(), page.getTotalElements());
}
}
The error I get is: java.lang.IllegalAccessException: class is not public: org.springframework.data.domain.Chunk.getContent
I'm using latest version 2.14.2 under java17
cowtowncoder commented
We would need a reproduction to see what is happening: description alone isn't sufficient.
I am not 100% clear for example if failure is with or without Afterburner (I assume with since it's filed here... ?).
I would suggest trying 2.15.1 that was just released, just in case.
cowtowncoder commented
Cannot reproduce, closing. May be re-opened/re-filed with test case.