From: Simon Brandhof Date: Mon, 30 Jun 2014 09:38:39 +0000 (+0200) Subject: Fix some quality flaws X-Git-Tag: 4.4-RC1~101 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9c389f666b86278b36bdca8370d6bd2315db5d84;p=sonarqube.git Fix some quality flaws --- diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/migration/v44/Migration44Mapper.java b/sonar-core/src/main/java/org/sonar/core/persistence/migration/v44/Migration44Mapper.java index d3bde433e58..bd6d139f3b1 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/migration/v44/Migration44Mapper.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/migration/v44/Migration44Mapper.java @@ -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 selectActiveRuleChange(@Param("enabled") Boolean enabled); + List selectActiveRuleChange(@Nullable @Param("enabled") Boolean enabled); } diff --git a/sonar-server/src/main/java/org/sonar/server/db/migrations/v44/ChangeLogMigration.java b/sonar-server/src/main/java/org/sonar/server/db/migrations/v44/ChangeLogMigration.java index 9b105522700..2a3f67432d8 100644 --- a/sonar-server/src/main/java/org/sonar/server/db/migrations/v44/ChangeLogMigration.java +++ b/sonar-server/src/main/java/org/sonar/server/db/migrations/v44/ChangeLogMigration.java @@ -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); diff --git a/sonar-server/src/main/java/org/sonar/server/db/migrations/v44/FeedQProfileDatesMigration.java b/sonar-server/src/main/java/org/sonar/server/db/migrations/v44/FeedQProfileDatesMigration.java index 8194061fee4..198d0dbb928 100644 --- a/sonar-server/src/main/java/org/sonar/server/db/migrations/v44/FeedQProfileDatesMigration.java +++ b/sonar-server/src/main/java/org/sonar/server/db/migrations/v44/FeedQProfileDatesMigration.java @@ -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; diff --git a/sonar-server/src/main/java/org/sonar/server/db/migrations/v44/IssueActionPlanKeyMigration.java b/sonar-server/src/main/java/org/sonar/server/db/migrations/v44/IssueActionPlanKeyMigration.java index fa015613f03..129b56f862f 100644 --- a/sonar-server/src/main/java/org/sonar/server/db/migrations/v44/IssueActionPlanKeyMigration.java +++ b/sonar-server/src/main/java/org/sonar/server/db/migrations/v44/IssueActionPlanKeyMigration.java @@ -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 {