diff options
author | Zeeshan Asghar <zeeshan.asghar@devfactory.com> | 2016-01-21 15:56:32 +0500 |
---|---|---|
committer | Teryk Bellahsene <teryk.bellahsene@sonarsource.com> | 2016-01-29 17:01:31 +0100 |
commit | bf071cefa1d04303ae246de745a8856c64b9617f (patch) | |
tree | 8d31b74cadac3271f8519d3d76566f04b2139e45 /sonar-db/src | |
parent | 1fc88e490a8db848301e784d53d5170018b6d1e5 (diff) | |
download | sonarqube-bf071cefa1d04303ae246de745a8856c64b9617f.tar.gz sonarqube-bf071cefa1d04303ae246de745a8856c64b9617f.zip |
squid:S1213 members of an interface decleration or class should appear in a pre-defined order
Diffstat (limited to 'sonar-db/src')
4 files changed, 13 insertions, 15 deletions
diff --git a/sonar-db/src/main/java/org/sonar/db/ce/CeTaskTypes.java b/sonar-db/src/main/java/org/sonar/db/ce/CeTaskTypes.java index 0f62882520d..6ea20d53cd5 100644 --- a/sonar-db/src/main/java/org/sonar/db/ce/CeTaskTypes.java +++ b/sonar-db/src/main/java/org/sonar/db/ce/CeTaskTypes.java @@ -20,11 +20,11 @@ package org.sonar.db.ce; public final class CeTaskTypes { + + public static final String REPORT = "REPORT"; private CeTaskTypes() { // only statics } - public static final String REPORT = "REPORT"; - } diff --git a/sonar-db/src/main/java/org/sonar/db/dialect/DialectUtils.java b/sonar-db/src/main/java/org/sonar/db/dialect/DialectUtils.java index ecfa56a425c..dba39b9efe1 100644 --- a/sonar-db/src/main/java/org/sonar/db/dialect/DialectUtils.java +++ b/sonar-db/src/main/java/org/sonar/db/dialect/DialectUtils.java @@ -29,12 +29,12 @@ import org.sonar.api.utils.MessageException; public final class DialectUtils { + private static final Dialect[] DIALECTS = new Dialect[] {new H2(), new MySql(), new Oracle(), new PostgreSql(), new MsSql()}; + private DialectUtils() { // only static stuff } - - private static final Dialect[] DIALECTS = new Dialect[] {new H2(), new MySql(), new Oracle(), new PostgreSql(), new MsSql()}; - + public static Dialect find(final String dialectId, final String jdbcConnectionUrl) { Dialect match = StringUtils.isNotBlank(dialectId) ? findById(dialectId) : findByJdbcUrl(jdbcConnectionUrl); if (match == null) { diff --git a/sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDto.java b/sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDto.java index c6fd92c67b5..124a5413318 100644 --- a/sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDto.java +++ b/sonar-db/src/main/java/org/sonar/db/qualityprofile/ActiveRuleDto.java @@ -45,6 +45,8 @@ public class ActiveRuleDto extends Dto<ActiveRuleKey> { private Integer ruleId; private Integer severity; private String inheritance; + //This field do not exists in db, it's only retrieve by joins + private Integer parentId; /** * @deprecated for internal use, should be private @@ -62,9 +64,6 @@ public class ActiveRuleDto extends Dto<ActiveRuleKey> { return ActiveRuleKey.of(profileKey, RuleKey.of(repository, ruleField)); } - // This field do not exists in db, it's only retrieve by joins - private Integer parentId; - public Integer getId() { return id; } diff --git a/sonar-db/src/main/java/org/sonar/db/version/v50/FeedFileSources.java b/sonar-db/src/main/java/org/sonar/db/version/v50/FeedFileSources.java index 9a9875b5987..3be89162817 100644 --- a/sonar-db/src/main/java/org/sonar/db/version/v50/FeedFileSources.java +++ b/sonar-db/src/main/java/org/sonar/db/version/v50/FeedFileSources.java @@ -39,6 +39,7 @@ import org.sonar.db.version.SqlStatement; */ public class FeedFileSources extends BaseDataChange { + private final System2 system; private static final String SELECT_FILES_AND_MEASURES_SQL = "SELECT " + "p.uuid, " + "f.uuid, " + @@ -138,6 +139,11 @@ public class FeedFileSources extends BaseDataChange { "AND p.scope = 'PRJ' AND p.qualifier = 'TRK' " + "AND fs.file_uuid IS NULL"; + public FeedFileSources(Database db, System2 system) { + super(db); + this.system = system; + } + private static final class FileSourceBuilder implements MassUpdate.Handler { private final long now; @@ -220,13 +226,6 @@ public class FeedFileSources extends BaseDataChange { return new String(result, StandardCharsets.UTF_8); } - private final System2 system; - - public FeedFileSources(Database db, System2 system) { - super(db); - this.system = system; - } - @Override public void execute(Context context) throws SQLException { RowReader<Long> simpleLongReader = new RowReader<Long>() { |