mirror of
https://github.com/ONLYOFFICE/document-server-integration.git
synced 2026-04-07 14:06:11 +08:00
fix(java): empty strings as null in json dererialization. fix bug 66534
This commit is contained in:
@ -29,6 +29,7 @@ import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
public final class FormatManager {
|
||||
@ -93,6 +94,7 @@ public final class FormatManager {
|
||||
private List<Format> all() {
|
||||
try {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
objectMapper.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true);
|
||||
Path path = this.file();
|
||||
return objectMapper.readValue(Files.readAllBytes(path), new TypeReference<List<Format>>() { });
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user