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 f473ef6708..4fc2694c2d 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 {