Skip to content

Commit bcbc819

Browse files
committed
improve: fix misleading useSecondaryToPrimaryIndex method name
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
1 parent 1df5cba commit bcbc819

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

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

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public InformerEventSource(
7070
configuration);
7171
// If there is a primary to secondary mapper there is no need for primary to secondary index.
7272
primaryToSecondaryMapper = configuration.getPrimaryToSecondaryMapper();
73-
if (useSecondaryToPrimaryIndex()) {
73+
if (usePrimaryToSecondaryIndex()) {
7474
primaryToSecondaryIndex =
7575
// The index uses the secondary to primary mapper (always present) to build the index
7676
new DefaultPrimaryToSecondaryIndex<>(configuration.getSecondaryToPrimaryMapper());
@@ -236,7 +236,7 @@ protected void propagateEvent(R resource, R oldResource, Set<ResourceID> primary
236236
@Override
237237
public Set<R> getSecondaryResources(P primary) {
238238
Set<ResourceID> secondaryIDs;
239-
if (useSecondaryToPrimaryIndex()) {
239+
if (usePrimaryToSecondaryIndex()) {
240240
var primaryResourceID = ResourceID.fromResource(primary);
241241
secondaryIDs = primaryToSecondaryIndex.getSecondaryResources(primaryResourceID);
242242
log.debug(
@@ -281,7 +281,7 @@ private Set<ResourceID> handleRecentCreateOrUpdate(R newResource, R previousVers
281281
return relatedPrimaryIds;
282282
}
283283

284-
private boolean useSecondaryToPrimaryIndex() {
284+
private boolean usePrimaryToSecondaryIndex() {
285285
return this.primaryToSecondaryMapper == null;
286286
}
287287

0 commit comments

Comments
 (0)