fix checkSHA256 npe
This commit is contained in:
parent
3b092c9652
commit
ad173c9587
|
@ -100,9 +100,9 @@ object InternetTools {
|
|||
return getJsonString(hashUrl, obj, context)
|
||||
}
|
||||
|
||||
fun checkSHA256(sha256: String, updateFile: File?): Boolean {
|
||||
fun checkSHA256(sha256: String, updateFile: File): Boolean {
|
||||
return try {
|
||||
val dataBuffer = updateFile!!.readBytes()
|
||||
val dataBuffer = updateFile.readBytes()
|
||||
// Generate the checksum
|
||||
val sum = generateChecksum(dataBuffer)
|
||||
|
||||
|
|
Loading…
Reference in New Issue