Skip to content

Commit 4fb68af

Browse files
committed
fix: format
1 parent f9ea879 commit 4fb68af

File tree

7 files changed

+24
-16
lines changed

7 files changed

+24
-16
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/Operator.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ public Operator(Consumer<ConfigurationServiceOverrider> overrider) {
5858
}
5959

6060
public Operator(KubernetesClient client, Consumer<ConfigurationServiceOverrider> overrider) {
61-
this(client, ConfigurationService.newOverriddenConfigurationService(new BaseConfigurationService(), overrider));
61+
this(client, ConfigurationService
62+
.newOverriddenConfigurationService(new BaseConfigurationService(), overrider));
6263
}
6364

6465
/**

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,8 @@ default ResourceClassResolver getResourceClassResolver() {
253253
return new DefaultResourceClassResolver();
254254
}
255255

256-
static ConfigurationService newOverriddenConfigurationService(ConfigurationService baseConfiguration,
256+
static ConfigurationService newOverriddenConfigurationService(
257+
ConfigurationService baseConfiguration,
257258
Consumer<ConfigurationServiceOverrider> overrider) {
258259
if (overrider != null) {
259260
final var toOverride = new ConfigurationServiceOverrider(baseConfiguration);

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,9 @@ public ResourceClassResolver getResourceClassResolver() {
236236
}
237237

238238
/**
239-
* @deprecated Use {@link ConfigurationService#newOverriddenConfigurationService(ConfigurationService, Consumer)} instead
239+
* @deprecated Use
240+
* {@link ConfigurationService#newOverriddenConfigurationService(ConfigurationService, Consumer)}
241+
* instead
240242
* @param original that will be overridden
241243
* @return current overrider
242244
*/

operator-framework-core/src/test/java/io/javaoperatorsdk/operator/LeaderElectionManagerTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ class LeaderElectionManagerTest {
3030
void setUp() {
3131
ControllerManager controllerManager = mock(ControllerManager.class);
3232
kubernetesClient = mock(KubernetesClient.class);
33-
var configurationService = ConfigurationService.newOverriddenConfigurationService(new BaseConfigurationService(),
34-
o -> o.withLeaderElectionConfiguration(new LeaderElectionConfiguration("test")));
33+
var configurationService =
34+
ConfigurationService.newOverriddenConfigurationService(new BaseConfigurationService(),
35+
o -> o.withLeaderElectionConfiguration(new LeaderElectionConfiguration("test")));
3536
var execServiceManager = new ExecutorServiceManager(configurationService);
3637
execServiceManager.init();
3738
leaderElectionManager =

operator-framework-core/src/test/java/io/javaoperatorsdk/operator/processing/event/ReconciliationDispatcherTest.java

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,15 @@ static void classSetup() {
8181
* equals will fail on the two equal but NOT identical TestCustomResources because equals is not
8282
* implemented on TestCustomResourceSpec or TestCustomResourceStatus
8383
*/
84-
configurationService = ConfigurationService.newOverriddenConfigurationService(new BaseConfigurationService(),
85-
overrider -> overrider.checkingCRDAndValidateLocalModel(false)
86-
.withResourceCloner(new Cloner() {
87-
@Override
88-
public <R extends HasMetadata> R clone(R object) {
89-
return object;
90-
}
91-
}));
84+
configurationService =
85+
ConfigurationService.newOverriddenConfigurationService(new BaseConfigurationService(),
86+
overrider -> overrider.checkingCRDAndValidateLocalModel(false)
87+
.withResourceCloner(new Cloner() {
88+
@Override
89+
public <R extends HasMetadata> R clone(R object) {
90+
return object;
91+
}
92+
}));
9293
executorServiceManager = new ExecutorServiceManager(configurationService);
9394
executorServiceManager.init();
9495
}

operator-framework-core/src/test/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerEventSourceTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,8 +251,9 @@ void filtersOnDeleteEvents() {
251251
void informerStoppedHandlerShouldBeCalledWhenInformerStops() {
252252
final var exception = new RuntimeException("Informer stopped exceptionally!");
253253
final var informerStoppedHandler = mock(InformerStoppedHandler.class);
254-
var configuration = ConfigurationService.newOverriddenConfigurationService(new BaseConfigurationService(),
255-
o -> o.withInformerStoppedHandler(informerStoppedHandler));
254+
var configuration =
255+
ConfigurationService.newOverriddenConfigurationService(new BaseConfigurationService(),
256+
o -> o.withInformerStoppedHandler(informerStoppedHandler));
256257

257258
informerEventSource = new InformerEventSource<>(informerConfiguration,
258259
MockKubernetesClient.client(Deployment.class, unused -> {

operator-framework-junit5/src/main/java/io/javaoperatorsdk/operator/junit/AbstractOperatorExtension.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@ public T oneNamespacePerClass(boolean value) {
260260
}
261261

262262
public T withConfigurationService(Consumer<ConfigurationServiceOverrider> overrider) {
263-
configurationService = ConfigurationService.newOverriddenConfigurationService(configurationService, overrider);
263+
configurationService =
264+
ConfigurationService.newOverriddenConfigurationService(configurationService, overrider);
264265
return (T) this;
265266
}
266267

0 commit comments

Comments
 (0)