Skip to content

Commit 5696acc

Browse files
committed
Fix crash on Java 9 Runtime
1 parent b0d048b commit 5696acc

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Releases
22

3+
## v1.0.1
4+
* do not use `javax.xml.bind.*` dependencies, that might crash on jre9
5+
36
## v1.0.0
47
* will not prompt user on install if only 1 device present and only 1 apk to install
58

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
<groupId>at.favre.tools</groupId>
2626
<artifactId>uber-adb-tools</artifactId>
27-
<version>1.1.0</version>
27+
<version>1.0.1</version>
2828

2929
<prerequisites>
3030
<maven>3.1.0</maven>

src/main/java/at/favre/tools/uberadb/util/FileUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@
1818

1919
package at.favre.tools.uberadb.util;
2020

21-
import javax.xml.bind.DatatypeConverter;
2221
import java.io.File;
2322
import java.io.FileInputStream;
2423
import java.io.IOException;
2524
import java.io.InputStream;
25+
import java.math.BigInteger;
2626
import java.nio.file.FileVisitResult;
2727
import java.nio.file.Files;
2828
import java.nio.file.Path;
@@ -63,7 +63,7 @@ public static String createChecksum(File file, String shaAlgo) {
6363
} while (numRead != -1);
6464

6565
fis.close();
66-
return DatatypeConverter.printHexBinary(complete.digest()).toLowerCase();
66+
return new BigInteger(1, complete.digest()).toString(16).toLowerCase();
6767
} catch (Exception e) {
6868
throw new IllegalStateException("could not create checksum for " + file + " and algo " + shaAlgo + ": " + e.getMessage(), e);
6969
}

0 commit comments

Comments
 (0)