import org.apache.ibatis.annotations.Param;
import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
import java.util.Date;
import java.util.List;
@Param("rulesUpdatedAt") String rulesUpdatedAt);
// migrate changeLog to Activities
- List<ChangeLog> selectActiveRuleChange(@Param("enabled") Boolean enabled);
+ List<ChangeLog> selectActiveRuleChange(@Nullable @Param("enabled") Boolean enabled);
}
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;
*/
public class ChangeLogMigration implements DatabaseMigration {
- private static final Logger LOGGER = LoggerFactory.getLogger(ChangeLogMigration.class);
-
private final ActivityDao dao;
private final DbClient db;
}
}
-
private void saveActiveRuleChange(DbSession session, ActiveRuleChange ruleChange, String author, Date currentTimeStamp) {
ActivityDto activity = ActivityDto.createFor(ruleChange);
activity.setType(Activity.Type.QPROFILE);
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;
return true;
}
}
- );
+ );
}
private static class Row {