Skip to content

Commit

Permalink
Fix compilation error.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Boerman committed Dec 25, 2024
1 parent bd0c8d8 commit 9d45537
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,9 @@ private static void checkSha1Hash(File outputFile, String sha1hash) throws IOExc
if (sha1hash == null || sha1hash.isEmpty()) return;

try {
if (!sha1hash.equals(getSha1Hash(outputFile))) {
throw new IOException("Unexpected hash for " + outputFile.getName() + ", expected: " + sha1hash + ", actual: " + hashValue);
String calculatedHash = getSha1Hash(outputFile));
if (!sha1hash.equals(calculatedHash)) {
throw new IOException("Unexpected hash for " + outputFile.getName() + ", expected: " + sha1hash + ", actual: " + calculatedHash);
}
} catch (NoSuchAlgorithmException e) {
throw new IOException("Could not find SHA-1 MessageDigest.", e);
Expand Down

0 comments on commit 9d45537

Please sign in to comment.