Skip to content

Commit

Permalink
Apply review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Stockinger committed Apr 7, 2022
1 parent 4f28875 commit 52a5c4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -543,14 +543,12 @@ Checksum hashCopiedFiles() {
byte[] bytes = string.getBytes();
checksum.update(bytes, 0, bytes.length);
};
copyToFileContainerPathMap.entrySet().stream().sorted(Entry.comparingByValue()).forEach(entry -> {
updateFromString.accept(entry.getValue());
entry.getKey().updateChecksum(checksum);
});
copyToTransferableContainerPathMap.entrySet().stream().sorted(Entry.comparingByValue()).forEach(entry -> {
updateFromString.accept(entry.getValue());
entry.getKey().updateChecksum(checksum);
});
Stream.of(copyToFileContainerPathMap, copyToTransferableContainerPathMap)
.flatMap(it -> it.entrySet().stream())
.sorted(Entry.comparingByValue()).forEach(entry -> {
updateFromString.accept(entry.getValue());
entry.getKey().updateChecksum(checksum);
});
return checksum;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ public byte[] getBytes() {

@Override
public void updateChecksum(Checksum checksum) {
byte[] bytes = getBytes();
checksum.update(bytes, 0, bytes.length);
}

Expand Down

0 comments on commit 52a5c4b

Please sign in to comment.