Skip to content

Commit 2c662f0

Browse files
author
Florian Knecht
committed
Delegate getting the secondary resource to a present eventsource by default.
1 parent 5dd1564 commit 2c662f0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/dependent/AbstractEventSourceHolderDependentResource.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ public Class<R> resourceType() {
9797
return resourceType;
9898
}
9999

100+
@Override
101+
public Optional<R> getSecondaryResource(P primary, Context<P> context) {
102+
return this.eventSource.getSecondaryResource(primary);
103+
}
104+
100105
protected abstract T createEventSource(EventSourceContext<P> context);
101106

102107
public void setEventSource(T eventSource) {

0 commit comments

Comments
 (0)