From f8dd11bb0315e8d4bdf6cb7087022f9dc55ed44f Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Wed, 19 Oct 2022 12:05:07 +0200 Subject: [PATCH] fix: incorrect type Signed-off-by: Marc Nuri --- .../client/informers/impl/SharedInformerFactoryImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/SharedInformerFactoryImpl.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/SharedInformerFactoryImpl.java index c9036a9e9a4..2de88270ecc 100644 --- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/SharedInformerFactoryImpl.java +++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/informers/impl/SharedInformerFactoryImpl.java @@ -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; @@ -107,16 +107,16 @@ public synchronized SharedIndexInformer getExistingSharedIndexInformer(Cl @Override public synchronized Future startAllRegisteredInformers() { - List> startInformerTasks = new ArrayList<>(); + List> startInformerTasks = new ArrayList<>(); if (!informers.isEmpty()) { for (SharedIndexInformer informer : informers) { - CompletionStage future = informer.start(); + CompletableFuture 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)));