aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-db
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2016-02-05 10:15:06 +0100
committerSimon Brandhof <simon.brandhof@sonarsource.com>2016-02-05 10:15:18 +0100
commite4c5970f42097fccb0948be068c3f4dda2352b78 (patch)
tree5d22d1e0f4d1350c91e44bf64176160e85ca371f /sonar-db
parent0a1a8bd87bd186cd86051496c4de4baba6615738 (diff)
downloadsonarqube-e4c5970f42097fccb0948be068c3f4dda2352b78.tar.gz
sonarqube-e4c5970f42097fccb0948be068c3f4dda2352b78.zip
Fix quality gates
Diffstat (limited to 'sonar-db')
-rw-r--r--sonar-db/src/main/java/org/sonar/db/dashboard/DashboardDao.java16
-rw-r--r--sonar-db/src/main/java/org/sonar/db/user/GroupDao.java1
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v52/MoveProjectProfileAssociation.java9
3 files changed, 13 insertions, 13 deletions
diff --git a/sonar-db/src/main/java/org/sonar/db/dashboard/DashboardDao.java b/sonar-db/src/main/java/org/sonar/db/dashboard/DashboardDao.java
index fd283b3d181..7dc94a8ecdf 100644
--- a/sonar-db/src/main/java/org/sonar/db/dashboard/DashboardDao.java
+++ b/sonar-db/src/main/java/org/sonar/db/dashboard/DashboardDao.java
@@ -48,15 +48,15 @@ public class DashboardDao implements Dao {
DashboardMapper dashboardMapper = session.getMapper(DashboardMapper.class);
WidgetMapper widgetMapper = session.getMapper(WidgetMapper.class);
WidgetPropertyMapper widgetPropertyMapper = session.getMapper(WidgetPropertyMapper.class);
- dashboardMapper.insert(dashboardDto);
- for (WidgetDto widgetDto : dashboardDto.getWidgets()) {
- widgetDto.setDashboardId(dashboardDto.getId());
- widgetMapper.insert(widgetDto);
- for (WidgetPropertyDto widgetPropertyDto : widgetDto.getWidgetProperties()) {
- widgetPropertyDto.setWidgetId(widgetDto.getId());
- widgetPropertyMapper.insert(widgetPropertyDto);
- }
+ dashboardMapper.insert(dashboardDto);
+ for (WidgetDto widgetDto : dashboardDto.getWidgets()) {
+ widgetDto.setDashboardId(dashboardDto.getId());
+ widgetMapper.insert(widgetDto);
+ for (WidgetPropertyDto widgetPropertyDto : widgetDto.getWidgetProperties()) {
+ widgetPropertyDto.setWidgetId(widgetDto.getId());
+ widgetPropertyMapper.insert(widgetPropertyDto);
}
+ }
}
public void insert(DashboardDto dashboardDto) {
diff --git a/sonar-db/src/main/java/org/sonar/db/user/GroupDao.java b/sonar-db/src/main/java/org/sonar/db/user/GroupDao.java
index a10ffd71f27..db5e428cc14 100644
--- a/sonar-db/src/main/java/org/sonar/db/user/GroupDao.java
+++ b/sonar-db/src/main/java/org/sonar/db/user/GroupDao.java
@@ -35,7 +35,6 @@ import org.sonar.db.WildcardPosition;
public class GroupDao implements Dao {
- private static final String SQL_WILDCARD = "%";
private System2 system;
public GroupDao(System2 system) {
diff --git a/sonar-db/src/main/java/org/sonar/db/version/v52/MoveProjectProfileAssociation.java b/sonar-db/src/main/java/org/sonar/db/version/v52/MoveProjectProfileAssociation.java
index 21451eb8fb8..bbfdd267962 100644
--- a/sonar-db/src/main/java/org/sonar/db/version/v52/MoveProjectProfileAssociation.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v52/MoveProjectProfileAssociation.java
@@ -79,6 +79,11 @@ public class MoveProjectProfileAssociation extends BaseDataChange {
update.setLong(1, id);
return true;
}
+
+ private static String extractLanguage(String propertyKey) {
+ return propertyKey.substring("sonar.profile.".length());
+ }
+
}
private static final Logger LOGGER = Loggers.get(MoveProjectProfileAssociation.class);
@@ -111,10 +116,6 @@ public class MoveProjectProfileAssociation extends BaseDataChange {
}
}
- private static String extractLanguage(String propertyKey) {
- return propertyKey.substring("sonar.profile.".length());
- }
-
private Table<String, String, String> getProfileKeysByLanguageThenName(final Context context) throws SQLException {
final Table<String, String, String> profilesByLanguageAndName = HashBasedTable.create();