Skip to content

Commit

Permalink
fix: incorrect type
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Nuri <marc@marcnuri.com>
  • Loading branch information
manusa committed Oct 19, 2022
1 parent 6bb2de9 commit f8dd11b
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public class SharedInformerFactoryImpl implements SharedInformerFactory {
private String name;
private String namespace;

private KubernetesClient client;
private final KubernetesClient client;

public SharedInformerFactoryImpl(KubernetesClient client) {
this.client = client;
Expand Down Expand Up @@ -107,16 +107,16 @@ public synchronized <T> SharedIndexInformer<T> getExistingSharedIndexInformer(Cl

@Override
public synchronized Future<Void> startAllRegisteredInformers() {
List<CompletionStage<Void>> startInformerTasks = new ArrayList<>();
List<CompletableFuture<Void>> startInformerTasks = new ArrayList<>();

if (!informers.isEmpty()) {
for (SharedIndexInformer<?> informer : informers) {
CompletionStage<Void> future = informer.start();
CompletableFuture<Void> future = informer.start().toCompletableFuture();
startInformerTasks.add(future);
future.whenComplete((v, t) -> {
if (t != null) {
if (this.eventListeners.isEmpty()) {
log.warn("Failed to start informer {}", informer.toString(), t);
log.warn("Failed to start informer {}", informer, t);
} else {
this.eventListeners
.forEach(listener -> listener.onException(informer, KubernetesClientException.launderThrowable(t)));
Expand Down

0 comments on commit f8dd11b

Please sign in to comment.