File tree Expand file tree Collapse file tree 3 files changed +6
-13
lines changed
core/src/main/java/org/testcontainers Expand file tree Collapse file tree 3 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -543,14 +543,12 @@ Checksum hashCopiedFiles() {
543543 byte [] bytes = string .getBytes ();
544544 checksum .update (bytes , 0 , bytes .length );
545545 };
546- copyToFileContainerPathMap .entrySet ().stream ().sorted (Entry .comparingByValue ()).forEach (entry -> {
547- updateFromString .accept (entry .getValue ());
548- entry .getKey ().updateChecksum (checksum );
549- });
550- copyToTransferableContainerPathMap .entrySet ().stream ().sorted (Entry .comparingByValue ()).forEach (entry -> {
551- updateFromString .accept (entry .getValue ());
552- entry .getKey ().updateChecksum (checksum );
553- });
546+ Stream .of (copyToFileContainerPathMap , copyToTransferableContainerPathMap )
547+ .flatMap (it -> it .entrySet ().stream ())
548+ .sorted (Entry .comparingByValue ()).forEach (entry -> {
549+ updateFromString .accept (entry .getValue ());
550+ entry .getKey ().updateChecksum (checksum );
551+ });
554552 return checksum ;
555553 }
556554
Original file line number Diff line number Diff line change @@ -35,7 +35,6 @@ public byte[] getBytes() {
3535
3636 @ Override
3737 public void updateChecksum (Checksum checksum ) {
38- byte [] bytes = getBytes ();
3938 checksum .update (bytes , 0 , bytes .length );
4039 }
4140
Original file line number Diff line number Diff line change @@ -368,10 +368,6 @@ public String getDescription() {
368368
369369 @ Override
370370 public void updateChecksum (Checksum checksum ) {
371- byte [] pathBytes = getBytes ();
372- // Add path to the hash
373- checksum .update (pathBytes , 0 , pathBytes .length );
374-
375371 File file = new File (getResolvedPath ());
376372 checksumFile (file , checksum );
377373 }
You can’t perform that action at this time.
0 commit comments