From 454a597927766d55d2746f0041573fd425012ff0 Mon Sep 17 00:00:00 2001 From: Oscar Spruit Date: Wed, 13 Nov 2024 15:39:16 +0100 Subject: [PATCH] Suppress NotDispatcherProvider rule in DispatcherProvider COAND-1020 --- .../src/main/java/com/adyen/checkout/core/DispatcherProvider.kt | 1 + .../java/com/adyen/checkout/test/TestDispatcherExtension.kt | 1 + 2 files changed, 2 insertions(+) diff --git a/checkout-core/src/main/java/com/adyen/checkout/core/DispatcherProvider.kt b/checkout-core/src/main/java/com/adyen/checkout/core/DispatcherProvider.kt index 090c7b96e0..44ebbcab28 100644 --- a/checkout-core/src/main/java/com/adyen/checkout/core/DispatcherProvider.kt +++ b/checkout-core/src/main/java/com/adyen/checkout/core/DispatcherProvider.kt @@ -13,6 +13,7 @@ import kotlinx.coroutines.CoroutineDispatcher import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.MainCoroutineDispatcher +@Suppress("NotDispatcherProvider") @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) object DispatcherProvider { diff --git a/test-core/src/testFixtures/java/com/adyen/checkout/test/TestDispatcherExtension.kt b/test-core/src/testFixtures/java/com/adyen/checkout/test/TestDispatcherExtension.kt index 8df09af10a..8d04084825 100644 --- a/test-core/src/testFixtures/java/com/adyen/checkout/test/TestDispatcherExtension.kt +++ b/test-core/src/testFixtures/java/com/adyen/checkout/test/TestDispatcherExtension.kt @@ -21,6 +21,7 @@ import org.junit.jupiter.api.extension.ExtensionContext * JUnit 5 extension that replaces [Dispatchers.Main] with a test dispatcher. This gives control over how the dispatcher * executes it's work. */ +@Suppress("NotDispatcherProvider") @OptIn(ExperimentalCoroutinesApi::class) class TestDispatcherExtension : BeforeEachCallback, AfterEachCallback {