test serializer error

This commit is contained in:
deiflaender 2022-06-14 14:25:27 +02:00
parent 2a6ee02f9f
commit 0c8ff214e4

View File

@ -64,16 +64,10 @@ public class RedactionStorageService {
@Timed("redactmanager_serializeObject") @Timed("redactmanager_serializeObject")
private byte[] serializeObject(Object any) { private byte[] serializeObject(Object any) {
try {
var baos = new ByteArrayOutputStream(); var baos = new ByteArrayOutputStream();
dslJson.serialize(any, baos); dslJson.serialize(any, baos);
return baos.toByteArray(); return baos.toByteArray();
} catch (com.dslplatform.json.SerializationException e) {
// Fails on file 49 Cyprodinil - EU AIR3 - MCA Section 8 Supplement - Ecotoxicological studies on the active substance.pdf
var bytes = objectMapper.writeValueAsBytes(any);
dslJson.newWriter();
return bytes;
}
} }