Skip to content

Commit fed53b5

Browse files
committed
improvement
Signed-off-by: Attila Mészáros <csviri@gmail.com>
1 parent c59aed2 commit fed53b5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ private void configureWith(String labelSelector, Set<String> namespaces,
8484

8585
@SuppressWarnings("unchecked")
8686
private SecondaryToPrimaryMapper<R> getSecondaryToPrimaryMapper() {
87-
if (this instanceof SecondaryToPrimaryMapper) {
87+
if (this instanceof SecondaryToPrimaryMapper && useAnnotationsToIdentifyPrimary()) {
8888
return (SecondaryToPrimaryMapper<R>) this;
8989
} else if (garbageCollected) {
9090
return Mappers.fromOwnerReference();

0 commit comments

Comments
 (0)