]> source.dussan.org Git - sonarqube.git/commitdiff
Fix some quality flaws
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 30 Jun 2014 09:38:39 +0000 (11:38 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Mon, 30 Jun 2014 09:38:39 +0000 (11:38 +0200)
sonar-core/src/main/java/org/sonar/core/persistence/migration/v44/Migration44Mapper.java
sonar-server/src/main/java/org/sonar/server/db/migrations/v44/ChangeLogMigration.java
sonar-server/src/main/java/org/sonar/server/db/migrations/v44/FeedQProfileDatesMigration.java
sonar-server/src/main/java/org/sonar/server/db/migrations/v44/IssueActionPlanKeyMigration.java

index d3bde433e589ce2eab0f24439090103dacec9106..bd6d139f3b1de9d7b3b409b1a1b5de18ae862af9 100644 (file)
@@ -22,6 +22,7 @@ package org.sonar.core.persistence.migration.v44;
 import org.apache.ibatis.annotations.Param;
 
 import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
 
 import java.util.Date;
 import java.util.List;
@@ -53,5 +54,5 @@ public interface Migration44Mapper {
     @Param("rulesUpdatedAt") String rulesUpdatedAt);
 
   // migrate changeLog to Activities
-  List<ChangeLog> selectActiveRuleChange(@Param("enabled") Boolean enabled);
+  List<ChangeLog> selectActiveRuleChange(@Nullable @Param("enabled") Boolean enabled);
 }
index 9b1055227004a2ec41071046bff3bfed4704f579..2a3f67432d824ebc3768d4b0d0776e94a116c3eb 100644 (file)
@@ -20,8 +20,6 @@
 package org.sonar.server.db.migrations.v44;
 
 import org.apache.commons.lang.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.sonar.api.rule.RuleKey;
 import org.sonar.core.activity.Activity;
 import org.sonar.core.activity.db.ActivityDto;
@@ -50,8 +48,6 @@ import java.util.List;
  */
 public class ChangeLogMigration implements DatabaseMigration {
 
-  private static final Logger LOGGER = LoggerFactory.getLogger(ChangeLogMigration.class);
-
   private final ActivityDao dao;
   private final DbClient db;
 
@@ -103,7 +99,6 @@ public class ChangeLogMigration implements DatabaseMigration {
     }
   }
 
-
   private void saveActiveRuleChange(DbSession session, ActiveRuleChange ruleChange, String author, Date currentTimeStamp) {
     ActivityDto activity = ActivityDto.createFor(ruleChange);
     activity.setType(Activity.Type.QPROFILE);
index 8194061fee4351fbd9a45937ce147ec6ca822eb5..198d0dbb92852fcc0ad2395113dbc583cbd802fa 100644 (file)
@@ -20,7 +20,6 @@
 
 package org.sonar.server.db.migrations.v44;
 
-import com.google.common.annotations.VisibleForTesting;
 import org.apache.commons.lang.ObjectUtils;
 import org.sonar.api.utils.System2;
 import org.sonar.core.UtcDateUtils;
index fa015613f033a518aa7afda1d69ed77110f99c17..129b56f862fe099f349a85e14194629c14135c44 100644 (file)
@@ -20,7 +20,6 @@
 
 package org.sonar.server.db.migrations.v44;
 
-import com.google.common.annotations.VisibleForTesting;
 import org.sonar.api.utils.System2;
 import org.sonar.core.persistence.Database;
 import org.sonar.server.db.migrations.DatabaseMigration;
@@ -81,7 +80,7 @@ public class IssueActionPlanKeyMigration implements DatabaseMigration {
           return true;
         }
       }
-    );
+      );
   }
 
   private static class Row {