Inject SchedulerImpl into DelegatedSchedulerImpl to fix waiting bundles (#1054)

Fixes #1053

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born 2019-09-29 16:47:19 +02:00 committed by Christoph Weitkamp
parent b48f1c1925
commit c9232d9651
2 changed files with 3 additions and 4 deletions

View File

@ -42,10 +42,10 @@ public class DelegatedSchedulerImpl implements Scheduler {
private final Set<ScheduledCompletableFuture<?>> scheduledJobs = new HashSet<>();
private @NonNullByDefault({}) Scheduler delegate;
private @NonNullByDefault({}) SchedulerImpl delegate;
@Activate
public DelegatedSchedulerImpl(final @Reference Scheduler scheduler) {
public DelegatedSchedulerImpl(final @Reference SchedulerImpl scheduler) {
this.delegate = scheduler;
}

View File

@ -25,7 +25,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
import java.util.function.BiFunction;
import org.eclipse.smarthome.core.scheduler.ScheduledCompletableFuture;
import org.eclipse.smarthome.core.scheduler.Scheduler;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
@ -40,7 +39,7 @@ public class DelegatedSchedulerTest {
private DelegatedSchedulerImpl delegatedscheduler;
@Mock
private Scheduler scheduler;
private SchedulerImpl scheduler;
@Mock
private ScheduledCompletableFuture<Instant> temporalScheduledFuture;
@Mock