Skip to content

Commit f4be98d

Browse files
committed
fix: fail fast if stopped future is null
1 parent 8aac329 commit f4be98d

File tree

1 file changed

+4
-6
lines changed
  • operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer

1 file changed

+4
-6
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerWrapper.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,10 @@ public InformerWrapper(SharedIndexInformer<T> informer) {
3131
ConfigurationServiceProvider.instance().getInformerStoppedHandler()
3232
.ifPresent(ish -> {
3333
final var stopped = informer.stopped();
34-
if (stopped != null) {
35-
stopped.handle((res, ex) -> {
36-
ish.onStop(informer, ex);
37-
return null;
38-
});
39-
}
34+
stopped.handle((res, ex) -> {
35+
ish.onStop(informer, ex);
36+
return null;
37+
});
4038
});
4139
this.cache = (Cache<T>) informer.getStore();
4240
}

0 commit comments

Comments
 (0)