summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-08-13 15:00:10 +0200
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>2015-08-13 15:02:19 +0200
commit64cab919086d9d3f46038210039c3ec0390e96b7 (patch)
treec9950e338646e2a717408486bc18108842f8f287
parent7eec379c123480440fe01c1acddd2640bd170c19 (diff)
downloadsonarqube-64cab919086d9d3f46038210039c3ec0390e96b7.tar.gz
sonarqube-64cab919086d9d3f46038210039c3ec0390e96b7.zip
fix quality flaws (package-info & coverage) in sonar-server
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/computation/container/ComputeEngineContainerImpl.java1
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/computation/monitoring/package-info.java24
-rw-r--r--server/sonar-server/src/main/java/org/sonar/server/view/bridge/package-info.java25
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/computation/qualityprofile/QualityProfileTest.java2
4 files changed, 52 insertions, 0 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/container/ComputeEngineContainerImpl.java b/server/sonar-server/src/main/java/org/sonar/server/computation/container/ComputeEngineContainerImpl.java
index 2d2ca9fef80..b17e1e50824 100644
--- a/server/sonar-server/src/main/java/org/sonar/server/computation/container/ComputeEngineContainerImpl.java
+++ b/server/sonar-server/src/main/java/org/sonar/server/computation/container/ComputeEngineContainerImpl.java
@@ -163,6 +163,7 @@ public class ComputeEngineContainerImpl extends ComponentContainer implements Co
private static class ComputeEngineComponentMonitor extends NullComponentMonitor {
+ @Override
public <T> void instantiated(PicoContainer container, ComponentAdapter<T> componentAdapter,
Constructor<T> constructor, Object instantiated, Object[] parameters, long duration) {
LOG.trace(format(ComponentMonitorHelper.INSTANTIATED, ctorToString(constructor), duration, instantiated.getClass().getName(), parmsToString(parameters)));
diff --git a/server/sonar-server/src/main/java/org/sonar/server/computation/monitoring/package-info.java b/server/sonar-server/src/main/java/org/sonar/server/computation/monitoring/package-info.java
new file mode 100644
index 00000000000..3c5189d9df5
--- /dev/null
+++ b/server/sonar-server/src/main/java/org/sonar/server/computation/monitoring/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.monitoring;
+
+import javax.annotation.ParametersAreNonnullByDefault;
diff --git a/server/sonar-server/src/main/java/org/sonar/server/view/bridge/package-info.java b/server/sonar-server/src/main/java/org/sonar/server/view/bridge/package-info.java
new file mode 100644
index 00000000000..54fba86bfe7
--- /dev/null
+++ b/server/sonar-server/src/main/java/org/sonar/server/view/bridge/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.server.view.bridge;
+
+import javax.annotation.ParametersAreNonnullByDefault;
+
diff --git a/server/sonar-server/src/test/java/org/sonar/server/computation/qualityprofile/QualityProfileTest.java b/server/sonar-server/src/test/java/org/sonar/server/computation/qualityprofile/QualityProfileTest.java
index 9db6e0f1b47..0107f5c87fa 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/computation/qualityprofile/QualityProfileTest.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/computation/qualityprofile/QualityProfileTest.java
@@ -69,6 +69,8 @@ public class QualityProfileTest {
@Test
public void verify_equals() {
assertThat(QUALITY_PROFILE).isEqualTo(new QualityProfile(SOME_QP_KEY, SOME_QP_NAME, SOME_LANGUAGE_KEY, SOME_DATE));
+ assertThat(QUALITY_PROFILE).isEqualTo(QUALITY_PROFILE);
+ assertThat(QUALITY_PROFILE).isNotEqualTo(null);
}
@Test