Fix low hanging detekt violations

This commit is contained in:
Wolf-Martell Montwé 2023-10-10 13:31:42 +02:00
parent 85509abc68
commit 012c8bd3b4
No known key found for this signature in database
GPG key ID: 6D45B21512ACBF72
4 changed files with 10 additions and 5 deletions

View file

@ -38,7 +38,9 @@ class RealOAuth2TokenProvider(
val oldAccessToken = authState.accessToken
try {
authState.performActionWithFreshTokens(authService) { accessToken: String?, _, authException: AuthorizationException? ->
authState.performActionWithFreshTokens(
authService,
) { accessToken: String?, _, authException: AuthorizationException? ->
token = accessToken
exception = authException

View file

@ -5,8 +5,8 @@ import android.os.Build
object PendingIntentCompat {
@JvmField
val FLAG_IMMUTABLE = if (Build.VERSION.SDK_INT >= 23) PendingIntent.FLAG_IMMUTABLE else 0
val FLAG_IMMUTABLE = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) PendingIntent.FLAG_IMMUTABLE else 0
@JvmField
val FLAG_MUTABLE = if (Build.VERSION.SDK_INT >= 31) PendingIntent.FLAG_MUTABLE else 0
val FLAG_MUTABLE = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) PendingIntent.FLAG_MUTABLE else 0
}

View file

@ -274,7 +274,8 @@ class HtmlSanitizerTest {
val result = htmlSanitizer.sanitize(html)
assertThat(result.toCompactString()).isEqualTo("<html><head><style>keep this</style></head><body></body></html>")
assertThat(result.toCompactString())
.isEqualTo("<html><head><style>keep this</style></head><body></body></html>")
}
@Test

View file

@ -38,7 +38,9 @@ class RealOAuth2TokenProvider(
val oldAccessToken = authState.accessToken
try {
authState.performActionWithFreshTokens(authService) { accessToken: String?, _, authException: AuthorizationException? ->
authState.performActionWithFreshTokens(
authService,
) { accessToken: String?, _, authException: AuthorizationException? ->
token = accessToken
exception = authException