]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-10089 Fix quality flaws
authorEric Hartmann <hartmann.eric@gmail.com>
Mon, 4 Dec 2017 17:02:57 +0000 (18:02 +0100)
committerEric Hartmann <hartmann.eric@gmail.com>
Mon, 4 Dec 2017 17:02:57 +0000 (18:02 +0100)
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v70/RenameOldSonarQubeWayQualityGate.java

index 3ba88942c0b8a1e839514c446928f705c6e2472c..c2ba08dfc832c174d85dbbdf80f4b124a3f364a7 100644 (file)
@@ -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);
-  }
 }