Skip to content

Commit 0a0f469

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

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ private void configureWith(String labelSelector, Set<String> namespaces,
8484

8585
@SuppressWarnings("unchecked")
8686
private SecondaryToPrimaryMapper<R> getSecondaryToPrimaryMapper() {
87-
if (this instanceof SecondaryToPrimaryMapper && useAnnotationsToIdentifyPrimary()) {
87+
if (this instanceof SecondaryToPrimaryMapper && useNonOwnerRefBasedSecondaryToPrimaryMapping()) {
8888
return (SecondaryToPrimaryMapper<R>) this;
8989
} else if (garbageCollected) {
9090
return Mappers.fromOwnerReference();
91-
} else if (useAnnotationsToIdentifyPrimary()) {
91+
} else if (useNonOwnerRefBasedSecondaryToPrimaryMapping()) {
9292
return Mappers.fromDefaultAnnotations();
9393
} else {
9494
throw new OperatorException("Provide a SecondaryToPrimaryMapper to associate " +
@@ -238,7 +238,7 @@ protected Resource<R> prepare(R desired, P primary, String actionName) {
238238
protected void addReferenceHandlingMetadata(R desired, P primary) {
239239
if (addOwnerReference()) {
240240
desired.addOwnerReference(primary);
241-
} else if (useAnnotationsToIdentifyPrimary()) {
241+
} else if (useNonOwnerRefBasedSecondaryToPrimaryMapping()) {
242242
addSecondaryToPrimaryMapperAnnotations(desired, primary);
243243
}
244244
}
@@ -269,7 +269,7 @@ protected InformerEventSource<R, P> createEventSource(EventSourceContext<P> cont
269269
return eventSource().orElseThrow();
270270
}
271271

272-
private boolean useAnnotationsToIdentifyPrimary() {
272+
private boolean useNonOwnerRefBasedSecondaryToPrimaryMapping() {
273273
return !garbageCollected && isCreatable();
274274
}
275275

0 commit comments

Comments
 (0)