diff --git a/sentinel/src/main/kotlin/com/infinum/sentinel/ui/certificates/observer/DelegateWorker.kt b/sentinel/src/main/kotlin/com/infinum/sentinel/ui/certificates/observer/DelegateWorker.kt index 7a78d21..6d06639 100644 --- a/sentinel/src/main/kotlin/com/infinum/sentinel/ui/certificates/observer/DelegateWorker.kt +++ b/sentinel/src/main/kotlin/com/infinum/sentinel/ui/certificates/observer/DelegateWorker.kt @@ -25,11 +25,11 @@ internal class DelegateWorker( parameters.inputData.getString(WORKER_CLASS_NAME) ?: "" private val workerId = parameters.inputData.getString(WORKER_ID) private val delegateWorkerFactory = workerFactories[workerId] - private val delegateWorker = delegateWorkerFactory?.createWorker(appContext, workerClassName, parameters) + private val delegatedWorker = delegateWorkerFactory?.createWorker(appContext, workerClassName, parameters) override fun startWork(): ListenableFuture { - return if (delegateWorker != null) { - delegateWorker.startWork() + return if (delegatedWorker != null) { + delegatedWorker.startWork() } else { val errorMessage = "No delegateWorker available for $workerId" + " with workerClassName of $workerClassName. Is the " + @@ -66,4 +66,4 @@ internal class DelegateWorker( get() = backingWorkerMap.entries } } -} \ No newline at end of file +} diff --git a/sentinel/src/main/kotlin/com/infinum/sentinel/ui/certificates/observer/SentinelWorkManager.kt b/sentinel/src/main/kotlin/com/infinum/sentinel/ui/certificates/observer/SentinelWorkManager.kt index f847dc2..8b7af79 100644 --- a/sentinel/src/main/kotlin/com/infinum/sentinel/ui/certificates/observer/SentinelWorkManager.kt +++ b/sentinel/src/main/kotlin/com/infinum/sentinel/ui/certificates/observer/SentinelWorkManager.kt @@ -85,7 +85,6 @@ internal class SentinelWorkManager( ) .build() ) - } fun certificatesCheckState(): Flow =