Removed most '!!'

This commit is contained in:
2017-09-01 07:29:44 +02:00
parent a23ae14f1d
commit 696cd6c0a6
19 changed files with 103 additions and 100 deletions

View File

@ -70,11 +70,12 @@ object Drawables {
if (address.alias != null) {
link.append("?label=").append(address.alias)
}
if (address.pubkey != null) {
address.pubkey?.apply {
link.append(if (address.alias == null) '?' else '&')
val pubkey = ByteArrayOutputStream()
address.pubkey!!.writeUnencrypted(pubkey)
writeUnencrypted(pubkey)
link.append("pubkey=").append(Base64.encodeToString(pubkey.toByteArray(), URL_SAFE or NO_WRAP))
}
val result: BitMatrix
try {

View File

@ -10,7 +10,7 @@ import java.math.BigInteger
* POW statistics that might help estimate the POW time, depending on
*/
object PowStats {
private val TWO_POW_64 = BigInteger.valueOf(2).pow(64)!!
private val TWO_POW_64: BigInteger = BigInteger.valueOf(2).pow(64)
var averagePowUnitTime = 0L
var powCount = 0L