From 5ddc230a9d0aec7c8cc8e43cee8c6815e40da3ba Mon Sep 17 00:00:00 2001 From: anhefti Date: Thu, 7 Mar 2024 15:25:26 +0100 Subject: [PATCH] SEBSERV-455 --- .../datalayer/checks/DowngradeSEBSettingsCheck.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/checks/DowngradeSEBSettingsCheck.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/checks/DowngradeSEBSettingsCheck.java index a6a4ea61..06a84392 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/checks/DowngradeSEBSettingsCheck.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/checks/DowngradeSEBSettingsCheck.java @@ -74,7 +74,7 @@ public class DowngradeSEBSettingsCheck implements DBIntegrityCheck { } @Override - public Result applyCheck(boolean tryFix) { + public Result applyCheck(final boolean tryFix) { return Result.tryCatch(() -> { final String[] split = StringUtils.split(versionAttributeIds, Constants.LIST_SEPARATOR_CHAR); @@ -138,8 +138,6 @@ public class DowngradeSEBSettingsCheck implements DBIntegrityCheck { final PreparedStatement prepareStatement = connection.prepareStatement( "DELETE FROM "+ schemaName +".flyway_schema_history WHERE version > " + lastMigrationVersion); prepareStatement.execute(); - final ResultSet resultSet = prepareStatement.getResultSet(); - final int num = resultSet.getInt(0); INIT_LOGGER.info(" ---> Deleted {} entries from table flyway_schema_history", deletedOrientation);