aboutsummaryrefslogtreecommitdiff
path: root/nailgun_launcher
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-09-15 13:48:24 +0100
committerChristopher Vogt <oss.nsp@cvogt.org>2016-09-19 09:42:50 -0400
commitc2aa97a77019d5bea02c463af687348a4ea682c7 (patch)
tree0b8af00ccd86153424a46858613d8c726d19a99e /nailgun_launcher
parent12eb7649a929a42d376831e8b0d7b6f38ee0876b (diff)
downloadcbt-c2aa97a77019d5bea02c463af687348a4ea682c7.tar.gz
cbt-c2aa97a77019d5bea02c463af687348a4ea682c7.tar.bz2
cbt-c2aa97a77019d5bea02c463af687348a4ea682c7.zip
use lower case instead of upper case for hashes to be consistent with SBT
Diffstat (limited to 'nailgun_launcher')
-rw-r--r--nailgun_launcher/Stage0Lib.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/nailgun_launcher/Stage0Lib.java b/nailgun_launcher/Stage0Lib.java
index bc6679e..11a9aab 100644
--- a/nailgun_launcher/Stage0Lib.java
+++ b/nailgun_launcher/Stage0Lib.java
@@ -166,7 +166,7 @@ public class Stage0Lib{
Files.copy(stream, unverified, StandardCopyOption.REPLACE_EXISTING);
stream.close();
final String checksum = sha1(Files.readAllBytes(unverified));
- if(sha1 == null || sha1.toUpperCase().equals(checksum)) {
+ if(sha1 == null || sha1.toLowerCase().equals(checksum)) {
Files.move(unverified, target, StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE);
} else {
System.err.println(target + " checksum does not match.\nExpected: |" + sha1 + "|\nFound: |" + checksum + "|");
@@ -178,7 +178,7 @@ public class Stage0Lib{
public static String sha1(byte[] bytes) throws Throwable {
final MessageDigest sha1 = MessageDigest.getInstance("SHA1");
sha1.update(bytes, 0, bytes.length);
- return (new HexBinaryAdapter()).marshal(sha1.digest()).toUpperCase();
+ return (new HexBinaryAdapter()).marshal(sha1.digest()).toLowerCase();
}
public static String join(String separator, String[] parts){