juliocbcotta
08/05/2025, 2:11 PMprivate fun FSProductToAdd.toOrderPipeModel(): OPProductToAdd {
return OPProductToAdd(
productId = productId,
quantity = quantity
)
}
even thought that is called inside of the class...
I also got a bunch of RedundantSuspendModifier
private suspend fun register() = suspendCoroutine { cont ->
// do integration with callbacks from tracking library
}
also UnreachableCode
internal fun decodeJwt(token: String): JSONObject? {
var stringToDecode = (token.split('.').getOrNull(1) ?: return null)
.replace('-', '+')
.replace('_', '/')
@Suppress("MagicNumber")
when (stringToDecode.codePointCount(0, stringToDecode.lastIndex) % 4) {
2 -> stringToDecode += "=="
3 -> stringToDecode += '='
else -> {
// nothing to do
}
}
--> line 32 return try {
stringToDecode.decodeBase64()?.utf8()?.let(::JSONObject)
} catch (e: JSONException) {
Timber.e(e, "Tried to decode a JSON Web Token that is not JSON!")
null
}
}
saying JwtDecoder.kt:32:5: This expression is unreachable code which should either be used or removed. [UnreachableCode]
Brais Gabin
08/05/2025, 5:10 PMdead.fish
09/01/2025, 12:15 PMdead.fish
09/01/2025, 12:34 PMdead.fish
09/01/2025, 12:35 PM