From d9a1d70d05b88b7b0f883655ee8c26ce52bb0b58 Mon Sep 17 00:00:00 2001 From: "patrick.pdb" Date: Fri, 5 Jan 2024 14:33:39 -0300 Subject: [PATCH] Do not create new SyncMetadata if metadata object is already on SyncMetadata type. --- iped-engine/src/main/java/iped/engine/task/ParsingTask.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iped-engine/src/main/java/iped/engine/task/ParsingTask.java b/iped-engine/src/main/java/iped/engine/task/ParsingTask.java index b4c1136cb5..b9ebd8c8b8 100644 --- a/iped-engine/src/main/java/iped/engine/task/ParsingTask.java +++ b/iped-engine/src/main/java/iped/engine/task/ParsingTask.java @@ -554,7 +554,9 @@ public void parseEmbedded(InputStream inputStream, ContentHandler handler, Metad evidence.setHasChildren(true); // protection for future concurrent access, see #794 - metadata = new SyncMetadata(metadata); + if (!(metadata instanceof SyncMetadata)) { + metadata = new SyncMetadata(metadata); + } subItem.setMetadata(metadata); boolean updateInputStream = false;