Skip to content

Commit

Permalink
'#2043 Only creates a SyncMetadata new instance if the original metadata
Browse files Browse the repository at this point in the history
object does not already implementes SyncMetadata interface.
  • Loading branch information
patrickdalla committed Jan 5, 2024
1 parent b7a23d0 commit 182047c
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 @@ -589,7 +589,9 @@ public void parseEmbedded(InputStream inputStream, ContentHandler handler, Metad
subItem.setTempAttribute(PARENT_CONTAINER_HASH, evidence.getHash());

// 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 182047c

Please sign in to comment.