Skip to content

Commit

Permalink
fix(iosMain/Base64): revert code simplification because of konan inco…
Browse files Browse the repository at this point in the history
…mpatibilities
  • Loading branch information
Marcel Kesselring authored and Marcel Kesselring committed Oct 20, 2021
1 parent dbc04eb commit bdc7f8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/iosMain/kotlin/com/liftric/cognito/idp/jwt/Base64.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ internal actual class Base64 {
encoded64 = encoded64.padEnd(input.count() + (4 - remainder), '=')
}
return NSData.create(encoded64, 0)?.let {
NSString.create(it, NSUTF8StringEncoding)
@Suppress("USELESS_CAST") // false positive inspection: konan fails if the cast is removed
(NSString.create(it, NSUTF8StringEncoding) as String?)
}?: run {
null
}
Expand Down

0 comments on commit bdc7f8c

Please sign in to comment.