Skip to content

Commit 520ba94

Browse files
committed
refactor: make constructors more coherent
1 parent b4e2b17 commit 520ba94

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

caffein-bounded-cache-support/src/main/java/io/javaoperatorsdk/operator/processing/event/source/cache/CaffeinBoundedItemStores.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ public static <R extends HasMetadata> BoundedItemStore<R> boundedItemStore(
4141

4242
public static <R extends HasMetadata> BoundedItemStore<R> boundedItemStore(
4343
KubernetesClient client, Class<R> rClass, Cache<String, R> cache) {
44-
return new BoundedItemStore<>(client,
45-
new CaffeinBoundedCache<>(cache), rClass);
44+
return new BoundedItemStore<>(new CaffeinBoundedCache<>(cache), rClass, client);
4645
}
4746

4847
}

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/config/BaseConfigurationService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ protected <P extends HasMetadata> ControllerConfiguration<P> configFor(Reconcile
133133
interval = reconciliationInterval.interval();
134134
timeUnit = reconciliationInterval.timeUnit();
135135
}
136-
136+
137137
final var config = new ResolvedControllerConfiguration<P>(
138138
resourceClass, name, generationAware,
139139
associatedReconcilerClass, retry, rateLimiter,

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/event/source/cache/BoundedItemStore.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ public class BoundedItemStore<R extends HasMetadata>
2626
private final Map<String, R> existingMinimalResources = new ConcurrentHashMap<>();
2727
private final Class<R> resourceClass;
2828

29-
public BoundedItemStore(KubernetesClient client,
30-
BoundedCache<String, R> cache, Class<R> resourceClass) {
29+
public BoundedItemStore(BoundedCache<String, R> cache, Class<R> resourceClass,
30+
KubernetesClient client) {
3131
this(cache, resourceClass, namespaceKeyFunc(),
3232
new KubernetesResourceFetcher<>(resourceClass, client));
3333
}

0 commit comments

Comments
 (0)