This is an automated email from the ASF dual-hosted git repository. bbende pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push: new 2f501fc NIFI-9836: fix database selection during nifi registry startup (#5907) 2f501fc is described below commit 2f501fcbe5ee8867a6ab98d7568a1c2694f58d40 Author: Zoltán Kornél Török <zto...@cloudera.com> AuthorDate: Tue Mar 29 17:32:21 2022 +0200 NIFI-9836: fix database selection during nifi registry startup (#5907) --- .../java/org/apache/nifi/registry/db/CustomFlywayConfiguration.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nifi-registry/nifi-registry-core/nifi-registry-framework/src/main/java/org/apache/nifi/registry/db/CustomFlywayConfiguration.java b/nifi-registry/nifi-registry-core/nifi-registry-framework/src/main/java/org/apache/nifi/registry/db/CustomFlywayConfiguration.java index f473ef6..4fc2694 100644 --- a/nifi-registry/nifi-registry-core/nifi-registry-framework/src/main/java/org/apache/nifi/registry/db/CustomFlywayConfiguration.java +++ b/nifi-registry/nifi-registry-core/nifi-registry-framework/src/main/java/org/apache/nifi/registry/db/CustomFlywayConfiguration.java @@ -58,10 +58,10 @@ public class CustomFlywayConfiguration implements FlywayConfigurationCustomizer final DatabaseType databaseType = getDatabaseType(configuration.getDataSource()); LOGGER.info("Determined database type is {}", databaseType.getName()); - if (databaseType.equals(new MySQLDatabaseType())) { + if (databaseType instanceof MySQLDatabaseType) { LOGGER.info("Setting migration locations to {}", Arrays.asList(LOCATIONS_MYSQL)); configuration.locations(LOCATIONS_MYSQL); - } else if (databaseType.equals(new PostgreSQLDatabaseType())) { + } else if (databaseType instanceof PostgreSQLDatabaseType) { LOGGER.info("Setting migration locations to {}", Arrays.asList(LOCATIONS_POSTGRES)); configuration.locations(LOCATIONS_POSTGRES); } else {