aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2015-03-27 16:15:12 +0100
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>2015-03-27 16:15:12 +0100
commit8b0becbe3ae16fef934d1e2066475b4a2ef52ea8 (patch)
treeb305a8a6854857a766d1937216590ec1a42a47e8
parent3fff0e8918b8de03e413b357ed46e4adaa71d2ca (diff)
downloadsonarqube-8b0becbe3ae16fef934d1e2066475b4a2ef52ea8.tar.gz
sonarqube-8b0becbe3ae16fef934d1e2066475b4a2ef52ea8.zip
fix quality flaws
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/computation/measure/package-info.java24
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/issue/notification/MyNewIssuesNotification.java10
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/issue/notification/NewIssuesNotification.java13
-rw-r--r--sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportReader.java3
4 files changed, 46 insertions, 4 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/measure/package-info.java b/server/sonar-server/src/main/java/org/sonar/server/computation/measure/package-info.java
new file mode 100644
index 00000000000..550a54bed01
--- /dev/null
+++ b/server/sonar-server/src/main/java/org/sonar/server/computation/measure/package-info.java
@@ -0,0 +1,24 @@
+/*
+ * 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.server.computation.measure;
+
+import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/notification/MyNewIssuesNotification.java b/server/sonar-server/src/main/java/org/sonar/server/issue/notification/MyNewIssuesNotification.java
index b0c0e92c2d2..615420541cd 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/issue/notification/MyNewIssuesNotification.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/issue/notification/MyNewIssuesNotification.java
@@ -39,4 +39,14 @@ public class MyNewIssuesNotification extends NewIssuesNotification {
return this;
}
+
+ @Override
+ public boolean equals(Object obj) {
+ return super.equals(obj);
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
}
diff --git a/server/sonar-server/src/main/java/org/sonar/server/issue/notification/NewIssuesNotification.java b/server/sonar-server/src/main/java/org/sonar/server/issue/notification/NewIssuesNotification.java
index c55f9fe0f98..58a9ed66f4e 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/issue/notification/NewIssuesNotification.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/issue/notification/NewIssuesNotification.java
@@ -43,9 +43,8 @@ import static org.sonar.server.issue.notification.NewIssuesStatistics.METRIC.SEV
public class NewIssuesNotification extends Notification {
- private static final long serialVersionUID = -6305871981920103093L;
-
public static final String TYPE = "new-issues";
+ private static final long serialVersionUID = -6305871981920103093L;
private static final String COUNT = ".count";
private static final String LABEL = ".label";
@@ -135,4 +134,14 @@ public class NewIssuesNotification extends Notification {
setFieldValue(SEVERITY + "." + severity + COUNT, String.valueOf(stats.countForMetric(SEVERITY, severity)));
}
}
+
+ @Override
+ public boolean equals(Object obj) {
+ return super.equals(obj);
+ }
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
}
diff --git a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportReader.java b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportReader.java
index 7b0f8f6bfaa..059f842d838 100644
--- a/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportReader.java
+++ b/sonar-batch-protocol/src/main/java/org/sonar/batch/protocol/output/BatchReportReader.java
@@ -57,8 +57,7 @@ public class BatchReportReader {
public BatchReport.Scm readComponentScm(int componentRef) {
File file = fileStructure.fileFor(FileStructure.Domain.SCM, componentRef);
if (file.exists() && file.isFile()) {
- BatchReport.Scm scm = ProtobufUtil.readFile(file, BatchReport.Scm.PARSER);
- return scm;
+ return ProtobufUtil.readFile(file, BatchReport.Scm.PARSER);
}
return null;
}