aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorJulien HENRY <julien.henry@sonarsource.com>2016-11-08 16:46:36 +0100
committerJulien HENRY <julien.henry@sonarsource.com>2016-11-08 16:46:52 +0100
commitcbce11b666ab221d1c2da35ef5082e18bf8fd573 (patch)
treef50b0f5528f37c2ba05cb4c95aeee4e7150c5347 /sonar-plugin-api
parent90b80bd13929daf105060524bd5170b1b0d30e96 (diff)
downloadsonarqube-cbce11b666ab221d1c2da35ef5082e18bf8fd573.tar.gz
sonarqube-cbce11b666ab221d1c2da35ef5082e18bf8fd573.zip
Fix quality flaws
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/internal/SensorContextTester.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/internal/SensorContextTester.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/internal/SensorContextTester.java
index e1820ef53c9..b94287ce6aa 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/internal/SensorContextTester.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/sensor/internal/SensorContextTester.java
@@ -32,6 +32,7 @@ import java.util.Objects;
import java.util.Set;
import java.util.stream.Stream;
import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
import org.sonar.api.SonarQubeSide;
import org.sonar.api.SonarRuntime;
import org.sonar.api.batch.fs.InputModule;
@@ -220,7 +221,7 @@ public class SensorContextTester implements SensorContext {
}
@CheckForNull
- public static Integer sumOrNull(Integer o1, Integer o2) {
+ public static Integer sumOrNull(@Nullable Integer o1, @Nullable Integer o2) {
return o1 == null ? o2 : (o1 + o2);
}
@@ -243,7 +244,7 @@ public class SensorContextTester implements SensorContext {
}
@CheckForNull
- public static Integer maxOrNull(Integer o1, Integer o2) {
+ public static Integer maxOrNull(@Nullable Integer o1, @Nullable Integer o2) {
return o1 == null ? o2 : Math.max(o1, o2);
}