diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-12-04 14:25:21 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-12-04 14:26:32 +0100 |
commit | 9df8ed37f34ceb5d26045bf2d75a56b2fe80e172 (patch) | |
tree | 15b9d5a4d484ccc809f745a243fd7becf0a05166 /sonar-db | |
parent | 58d45c1b7a60280949d5a3da512cde645e19e1bc (diff) | |
download | sonarqube-9df8ed37f34ceb5d26045bf2d75a56b2fe80e172.tar.gz sonarqube-9df8ed37f34ceb5d26045bf2d75a56b2fe80e172.zip |
Fix quality flaws
Diffstat (limited to 'sonar-db')
4 files changed, 4 insertions, 3 deletions
diff --git a/sonar-db/src/main/java/org/sonar/db/dashboard/DashboardMapper.java b/sonar-db/src/main/java/org/sonar/db/dashboard/DashboardMapper.java index a6222c6fcb8..e39494acca0 100644 --- a/sonar-db/src/main/java/org/sonar/db/dashboard/DashboardMapper.java +++ b/sonar-db/src/main/java/org/sonar/db/dashboard/DashboardMapper.java @@ -45,6 +45,6 @@ public interface DashboardMapper { @Insert("INSERT INTO dashboards (user_id, name, description, column_layout, shared, is_global, created_at, " + "updated_at) VALUES (#{userId}, #{name}, #{description}, #{columnLayout}, #{shared}, " + "#{global}, #{createdAt}, #{updatedAt})") - @Options(keyColumn = "id", useGeneratedKeys = true, keyProperty = "id") + @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") void insert(DashboardDto dashboardDto); } diff --git a/sonar-db/src/main/java/org/sonar/db/dashboard/WidgetMapper.java b/sonar-db/src/main/java/org/sonar/db/dashboard/WidgetMapper.java index c82e1b4c924..dcf00a6bf9c 100644 --- a/sonar-db/src/main/java/org/sonar/db/dashboard/WidgetMapper.java +++ b/sonar-db/src/main/java/org/sonar/db/dashboard/WidgetMapper.java @@ -31,7 +31,7 @@ public interface WidgetMapper { " values (#{dashboardId,jdbcType=INTEGER}, #{widgetKey,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, " + " #{description,jdbcType=VARCHAR}, #{columnIndex,jdbcType=INTEGER}, " + " #{rowIndex,jdbcType=INTEGER}, #{configured,jdbcType=BOOLEAN}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{resourceId,jdbcType=INTEGER})") - @Options(keyColumn = "id", useGeneratedKeys = true, keyProperty = "id") + @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") void insert(WidgetDto widgetDto); WidgetDto selectById(long widgetId); diff --git a/sonar-db/src/main/java/org/sonar/db/dashboard/WidgetPropertyMapper.java b/sonar-db/src/main/java/org/sonar/db/dashboard/WidgetPropertyMapper.java index 46432fba6b8..3b26323b7d2 100644 --- a/sonar-db/src/main/java/org/sonar/db/dashboard/WidgetPropertyMapper.java +++ b/sonar-db/src/main/java/org/sonar/db/dashboard/WidgetPropertyMapper.java @@ -31,7 +31,7 @@ public interface WidgetPropertyMapper { String COLUMNS = "wp.id, wp.widget_id as \"widgetId\", wp.kee as \"propertyKey\", wp.text_value as \"textValue\""; @Insert("insert into widget_properties (widget_id, kee, text_value) values (#{widgetId}, #{propertyKey}, #{textValue})") - @Options(keyColumn = "id", useGeneratedKeys = true, keyProperty = "id") + @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") void insert(WidgetPropertyDto dto); @CheckForNull diff --git a/sonar-db/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java b/sonar-db/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java index 8b94ef241bd..32f6ae890b4 100644 --- a/sonar-db/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java +++ b/sonar-db/src/test/java/org/sonar/db/ce/CeActivityDaoTest.java @@ -61,6 +61,7 @@ public class CeActivityDaoTest { assertThat(saved.get().getStartedAt()).isEqualTo(1_500_000_000_000L); assertThat(saved.get().getExecutedAt()).isEqualTo(1_500_000_000_500L); assertThat(saved.get().getExecutionTimeMs()).isEqualTo(500L); + assertThat(saved.get().toString()).isNotEmpty(); } @Test |