Skip to content

Explicit set final variables in BootloaderApp #10422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ public class BootloaderApp {

private final Configs configs;
private Runnable postLoadExecution;
private FeatureFlags featureFlags;
private final FeatureFlags featureFlags;

@VisibleForTesting
public BootloaderApp(Configs configs, FeatureFlags featureFlags) {
public BootloaderApp(final Configs configs, final FeatureFlags featureFlags) {
this.configs = configs;
this.featureFlags = featureFlags;
}
Expand All @@ -71,7 +71,7 @@ public BootloaderApp(Configs configs, FeatureFlags featureFlags) {
* @param configs
* @param postLoadExecution
*/
public BootloaderApp(Configs configs, Runnable postLoadExecution, FeatureFlags featureFlags) {
public BootloaderApp(final Configs configs, final Runnable postLoadExecution, final FeatureFlags featureFlags) {
this.configs = configs;
this.postLoadExecution = postLoadExecution;
this.featureFlags = featureFlags;
Expand All @@ -87,7 +87,7 @@ public BootloaderApp() {
final ConfigPersistence configPersistence = DatabaseConfigPersistence.createWithValidation(configDatabase);
configPersistence.loadData(YamlSeedConfigPersistence.getDefault());
LOGGER.info("Loaded seed data..");
} catch (IOException e) {
} catch (final IOException e) {
e.printStackTrace();
}
};
Expand Down Expand Up @@ -134,7 +134,7 @@ public void load() throws Exception {
LOGGER.info("Finished bootstrapping Airbyte environment..");
}

public static void main(String[] args) throws Exception {
public static void main(final String[] args) throws Exception {
final var bootloader = new BootloaderApp();
bootloader.load();
}
Expand Down Expand Up @@ -168,7 +168,8 @@ private static void createWorkspaceIfNoneExists(final ConfigRepository configRep
configRepository.writeStandardWorkspace(workspace);
}

private static void assertNonBreakingMigration(JobPersistence jobPersistence, AirbyteVersion airbyteVersion) throws IOException {
private static void assertNonBreakingMigration(final JobPersistence jobPersistence, final AirbyteVersion airbyteVersion)
throws IOException {
// version in the database when the server main method is called. may be empty if this is the first
// time the server is started.
LOGGER.info("Checking illegal upgrade..");
Expand Down Expand Up @@ -221,7 +222,7 @@ private static void runFlywayMigration(final Configs configs, final Database con

private static void cleanupZombies(final JobPersistence jobPersistence) throws IOException {
final Configs configs = new EnvConfigs();
WorkflowClient wfClient =
final WorkflowClient wfClient =
WorkflowClient.newInstance(WorkflowServiceStubs.newInstance(
WorkflowServiceStubsOptions.newBuilder().setTarget(configs.getTemporalHost()).build()));
for (final Job zombieJob : jobPersistence.listJobsWithStatus(JobStatus.RUNNING)) {
Expand Down