Skip to content

Commit

Permalink
Do not create new SyncMetadata if metadata object is already on
Browse files Browse the repository at this point in the history
SyncMetadata type.
  • Loading branch information
patrickdalla committed Jan 5, 2024
1 parent dcd61d7 commit d9a1d70
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion iped-engine/src/main/java/iped/engine/task/ParsingTask.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d9a1d70

Please sign in to comment.