aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-db
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2015-07-21 10:01:00 +0200
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2015-07-21 18:15:39 +0200
commit3d4701bc05805d19a695c449a93b1ef09553ba92 (patch)
treeeff744ad2f2437c531050b3a2eaae06dac88cff3 /sonar-db
parent1f655d484cecd606c7c4af4a3452dd25801f1bd6 (diff)
downloadsonarqube-3d4701bc05805d19a695c449a93b1ef09553ba92.tar.gz
sonarqube-3d4701bc05805d19a695c449a93b1ef09553ba92.zip
Fix quality flaws
Diffstat (limited to 'sonar-db')
-rw-r--r--sonar-db/src/main/java/org/sonar/db/measure/custom/package-info.java25
-rw-r--r--sonar-db/src/main/java/org/sonar/db/version/v51/FeedSnapshotsLongDates.java7
2 files changed, 30 insertions, 2 deletions
diff --git a/sonar-db/src/main/java/org/sonar/db/measure/custom/package-info.java b/sonar-db/src/main/java/org/sonar/db/measure/custom/package-info.java
new file mode 100644
index 00000000000..49b5449104a
--- /dev/null
+++ b/sonar-db/src/main/java/org/sonar/db/measure/custom/package-info.java
@@ -0,0 +1,25 @@
+/*
+ * SonarQube, open source software quality management tool.
+ * Copyright (C) 2008-2014 SonarSource
+ * mailto:contact AT sonarsource DOT com
+ *
+ * SonarQube is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * SonarQube is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+@ParametersAreNonnullByDefault
+package org.sonar.db.measure.custom;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/sonar-db/src/main/java/org/sonar/db/version/v51/FeedSnapshotsLongDates.java b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedSnapshotsLongDates.java
index 5e5ae4f149b..f9af35507ac 100644
--- a/sonar-db/src/main/java/org/sonar/db/version/v51/FeedSnapshotsLongDates.java
+++ b/sonar-db/src/main/java/org/sonar/db/version/v51/FeedSnapshotsLongDates.java
@@ -43,9 +43,12 @@ public class FeedSnapshotsLongDates extends BaseDataChange {
final long now = system2.now();
MassUpdate massUpdate = context.prepareMassUpdate();
massUpdate
- .select("SELECT s.created_at, s.build_date, s.period1_date, s.period2_date, s.period3_date, s.period4_date, s.period5_date, s.id FROM snapshots s WHERE created_at_ms IS NULL");
+ .select("SELECT s.created_at, s.build_date, s.period1_date, s.period2_date, s.period3_date, s.period4_date, s.period5_date, s.id FROM snapshots s " +
+ "WHERE created_at_ms IS NULL");
massUpdate
- .update("UPDATE snapshots SET created_at_ms=?, build_date_ms=?, period1_date_ms=?, period2_date_ms=?, period3_date_ms=?, period4_date_ms=?, period5_date_ms=? WHERE id=?");
+ .update("UPDATE snapshots " +
+ "SET created_at_ms=?, build_date_ms=?, period1_date_ms=?, period2_date_ms=?, period3_date_ms=?, period4_date_ms=?, period5_date_ms=? " +
+ "WHERE id=?");
massUpdate.rowPluralName("snapshots");
massUpdate.execute(new MassUpdate.Handler() {
@Override