From 91b56f1ed62ab0346fe0334331efe887e63742d9 Mon Sep 17 00:00:00 2001 From: Eric Hartmann Date: Mon, 4 Dec 2017 18:02:57 +0100 Subject: [PATCH] SONAR-10089 Fix quality flaws --- .../version/v70/RenameOldSonarQubeWayQualityGate.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v70/RenameOldSonarQubeWayQualityGate.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v70/RenameOldSonarQubeWayQualityGate.java index 3ba88942c0b..c2ba08dfc83 100644 --- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v70/RenameOldSonarQubeWayQualityGate.java +++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v70/RenameOldSonarQubeWayQualityGate.java @@ -42,8 +42,6 @@ public class RenameOldSonarQubeWayQualityGate extends DataChange { @Override protected void execute(Context context) throws SQLException { - //ensureThatOutdatedCopyQDoesNotExist(context); - try { MassUpdate massUpdate = context.prepareMassUpdate(); massUpdate.select("SELECT id FROM quality_gates WHERE name = ?") @@ -62,12 +60,4 @@ public class RenameOldSonarQubeWayQualityGate extends DataChange { throw ex; } } - - private boolean isOutdatedCopyQGExists(Context context) throws SQLException { - return context.prepareSelect( - "SELECT COUNT(id) FROM quality_gates WHERE name = ?") - .setString(1, SONARQUBE_WAY_QUALITY_GATE_OUTDATED) - .get( - row -> row.getInt(1) > 0); - } } -- 2.39.5