diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-10-09 23:35:41 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-10-09 23:35:41 +0200 |
commit | 7d562d641868532e5edbd6f03fac739eff9bcc90 (patch) | |
tree | 35f7ac6c07958d80561c898b9956b6830a071a66 /plugins | |
parent | 39934181c5a5eba68665ea8922ff9a28322d0c0a (diff) | |
download | sonarqube-7d562d641868532e5edbd6f03fac739eff9bcc90.tar.gz sonarqube-7d562d641868532e5edbd6f03fac739eff9bcc90.zip |
Fix quality flaws
Diffstat (limited to 'plugins')
9 files changed, 78 insertions, 10 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TendencyAnalyser.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TendencyAnalyser.java index 8a5ac59c66b..32b760bc463 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TendencyAnalyser.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/TendencyAnalyser.java @@ -19,6 +19,9 @@ */ package org.sonar.plugins.core.timemachine; +import javax.annotation.CheckForNull; +import javax.annotation.Nullable; + import java.util.List; public class TendencyAnalyser { @@ -142,11 +145,12 @@ public class TendencyAnalyser { this.yIntercept = yIntercept; } + @CheckForNull public Double getSlope() { return slope; } - public void setSlope(Double slope) { + public void setSlope(@Nullable Double slope) { this.slope = slope; } diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java index 8f54748066f..5d08e83cd93 100644 --- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java +++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/timemachine/VariationDecorator.java @@ -160,7 +160,7 @@ public class VariationDecorator implements Decorator { ruleId = PastMeasuresLoader.getRuleId(pastFields); } - MeasureKey(int metricId, Integer characteristicId, Integer personId, @Nullable Integer ruleId) { + MeasureKey(int metricId, @Nullable Integer characteristicId, @Nullable Integer personId, @Nullable Integer ruleId) { this.metricId = metricId; this.characteristicId = characteristicId; this.personId = personId; diff --git a/plugins/sonar-email-notifications-plugin/pom.xml b/plugins/sonar-email-notifications-plugin/pom.xml index adcf67041a8..474d5bcff20 100644 --- a/plugins/sonar-email-notifications-plugin/pom.xml +++ b/plugins/sonar-email-notifications-plugin/pom.xml @@ -23,10 +23,6 @@ <scope>provided</scope> </dependency> <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - </dependency> - <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-email</artifactId> <version>1.3.2</version> @@ -80,7 +76,7 @@ <configuration> <rules> <requireFilesSize> - <maxsize>600000</maxsize> + <maxsize>620000</maxsize> <minsize>590000</minsize> <files> <file>${project.build.directory}/${project.build.finalName}.jar</file> diff --git a/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/templates/alerts/AlertsEmailTemplate.java b/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/AlertsEmailTemplate.java index bd7fa46c3c6..542d35204f4 100644 --- a/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/templates/alerts/AlertsEmailTemplate.java +++ b/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/AlertsEmailTemplate.java @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.plugins.emailnotifications.templates.alerts; +package org.sonar.plugins.emailnotifications; import org.apache.commons.lang.StringUtils; import org.sonar.api.config.EmailSettings; diff --git a/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/EmailNotificationsPlugin.java b/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/EmailNotificationsPlugin.java index 01bf79e4f11..ddd9a536dd6 100644 --- a/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/EmailNotificationsPlugin.java +++ b/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/EmailNotificationsPlugin.java @@ -21,7 +21,6 @@ package org.sonar.plugins.emailnotifications; import com.google.common.collect.ImmutableList; import org.sonar.api.SonarPlugin; -import org.sonar.plugins.emailnotifications.templates.alerts.AlertsEmailTemplate; import java.util.List; diff --git a/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/api/package-info.java b/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/api/package-info.java new file mode 100644 index 00000000000..ef80b86a411 --- /dev/null +++ b/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/api/package-info.java @@ -0,0 +1,23 @@ +/* + * 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.plugins.emailnotifications.api; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/package-info.java b/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/package-info.java new file mode 100644 index 00000000000..db67dd7df17 --- /dev/null +++ b/plugins/sonar-email-notifications-plugin/src/main/java/org/sonar/plugins/emailnotifications/package-info.java @@ -0,0 +1,23 @@ +/* + * 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.plugins.emailnotifications; + +import javax.annotation.ParametersAreNonnullByDefault; diff --git a/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/templates/alerts/AlertsEmailTemplateTest.java b/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/AlertsEmailTemplateTest.java index 5cd4f0cf2a5..5b42a2a5953 100644 --- a/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/templates/alerts/AlertsEmailTemplateTest.java +++ b/plugins/sonar-email-notifications-plugin/src/test/java/org/sonar/plugins/emailnotifications/AlertsEmailTemplateTest.java @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.plugins.emailnotifications.templates.alerts; +package org.sonar.plugins.emailnotifications; import org.junit.Before; import org.junit.Test; diff --git a/plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/package-info.java b/plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/package-info.java new file mode 100644 index 00000000000..332d583940e --- /dev/null +++ b/plugins/sonar-l10n-en-plugin/src/main/java/org/sonar/plugins/l10n/package-info.java @@ -0,0 +1,23 @@ +/* + * 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.plugins.l10n; + +import javax.annotation.ParametersAreNonnullByDefault; |