diff --git a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerEventSource.java b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerEventSource.java index b03a22e894..d8a8de1189 100644 --- a/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerEventSource.java +++ b/operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerEventSource.java @@ -70,7 +70,7 @@ public InformerEventSource( configuration); // If there is a primary to secondary mapper there is no need for primary to secondary index. primaryToSecondaryMapper = configuration.getPrimaryToSecondaryMapper(); - if (useSecondaryToPrimaryIndex()) { + if (usePrimaryToSecondaryIndex()) { primaryToSecondaryIndex = // The index uses the secondary to primary mapper (always present) to build the index new DefaultPrimaryToSecondaryIndex<>(configuration.getSecondaryToPrimaryMapper()); @@ -236,7 +236,7 @@ protected void propagateEvent(R resource, R oldResource, Set primary @Override public Set getSecondaryResources(P primary) { Set secondaryIDs; - if (useSecondaryToPrimaryIndex()) { + if (usePrimaryToSecondaryIndex()) { var primaryResourceID = ResourceID.fromResource(primary); secondaryIDs = primaryToSecondaryIndex.getSecondaryResources(primaryResourceID); log.debug( @@ -281,7 +281,7 @@ private Set handleRecentCreateOrUpdate(R newResource, R previousVers return relatedPrimaryIds; } - private boolean useSecondaryToPrimaryIndex() { + private boolean usePrimaryToSecondaryIndex() { return this.primaryToSecondaryMapper == null; }