Skip to content

Commit 7143939

Browse files
findepirnorth
authored andcommitted
Accept List<GenericContainer> in deepStart (#2221)
1 parent 23e9718 commit 7143939

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

core/src/main/java/org/testcontainers/lifecycle/Startables.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public Thread newThread(Runnable r) {
2727
/**
2828
* @see #deepStart(Stream)
2929
*/
30-
public CompletableFuture<Void> deepStart(Collection<Startable> startables) {
30+
public CompletableFuture<Void> deepStart(Collection<? extends Startable> startables) {
3131
return deepStart(startables.stream());
3232
}
3333

@@ -49,7 +49,7 @@ public CompletableFuture<Void> deepStart(Collection<Startable> startables) {
4949
* @param startables a {@link Stream} of {@link Startable}s to start and scan for transitive dependencies.
5050
* @return a {@link CompletableFuture} that resolves once all {@link Startable}s have started.
5151
*/
52-
public CompletableFuture<Void> deepStart(Stream<Startable> startables) {
52+
public CompletableFuture<Void> deepStart(Stream<? extends Startable> startables) {
5353
return deepStart(new HashMap<>(), startables);
5454
}
5555

@@ -58,7 +58,7 @@ public CompletableFuture<Void> deepStart(Stream<Startable> startables) {
5858
* @param started an intermediate storage for already started {@link Startable}s to prevent multiple starts.
5959
* @param startables a {@link Stream} of {@link Startable}s to start and scan for transitive dependencies.
6060
*/
61-
private CompletableFuture<Void> deepStart(Map<Startable, CompletableFuture<Void>> started, Stream<Startable> startables) {
61+
private CompletableFuture<Void> deepStart(Map<Startable, CompletableFuture<Void>> started, Stream<? extends Startable> startables) {
6262
CompletableFuture[] futures = startables
6363
.sequential()
6464
.map(it -> {

0 commit comments

Comments
 (0)