aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-core
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-12-12 12:31:48 +0100
committerSimon Brandhof <simon.brandhof@gmail.com>2012-12-12 12:31:48 +0100
commitaa72696f4163a5a276d8d45eeb972a91f3a4b1ba (patch)
treebe46f3acc74145ed6d7f58b2f00f211a8f1ea3f7 /sonar-core
parentee08249875a844de0000f811b7455bc0dafdeb43 (diff)
downloadsonarqube-aa72696f4163a5a276d8d45eeb972a91f3a4b1ba.tar.gz
sonarqube-aa72696f4163a5a276d8d45eeb972a91f3a4b1ba.zip
Fix some quality flaws
Diffstat (limited to 'sonar-core')
-rw-r--r--sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterContext.java10
-rw-r--r--sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterDto.java8
2 files changed, 11 insertions, 7 deletions
diff --git a/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterContext.java b/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterContext.java
index 728ad0e9db3..20aa41cb21a 100644
--- a/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterContext.java
+++ b/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterContext.java
@@ -23,9 +23,11 @@ import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.sonar.core.resource.SnapshotDto;
+import javax.annotation.Nullable;
+
class MeasureFilterContext {
- private Long userId;
- private SnapshotDto baseSnapshot;
+ private Long userId = null;
+ private SnapshotDto baseSnapshot = null;
private String sql;
private String data;
@@ -33,7 +35,7 @@ class MeasureFilterContext {
return userId;
}
- MeasureFilterContext setUserId(Long userId) {
+ MeasureFilterContext setUserId(@Nullable Long userId) {
this.userId = userId;
return this;
}
@@ -42,7 +44,7 @@ class MeasureFilterContext {
return baseSnapshot;
}
- MeasureFilterContext setBaseSnapshot(SnapshotDto baseSnapshot) {
+ MeasureFilterContext setBaseSnapshot(@Nullable SnapshotDto baseSnapshot) {
this.baseSnapshot = baseSnapshot;
return this;
}
diff --git a/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterDto.java b/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterDto.java
index 7b888e2a8b0..dfb0fc6a5d2 100644
--- a/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterDto.java
+++ b/sonar-core/src/main/java/org/sonar/core/measure/MeasureFilterDto.java
@@ -19,6 +19,8 @@
*/
package org.sonar.core.measure;
+import javax.annotation.Nullable;
+
import java.util.Date;
/**
@@ -56,7 +58,7 @@ public class MeasureFilterDto {
return userId;
}
- public MeasureFilterDto setUserId(Long userId) {
+ public MeasureFilterDto setUserId(@Nullable Long userId) {
this.userId = userId;
return this;
}
@@ -65,7 +67,7 @@ public class MeasureFilterDto {
return shared;
}
- public MeasureFilterDto setShared(Boolean shared) {
+ public MeasureFilterDto setShared(@Nullable Boolean shared) {
this.shared = shared;
return this;
}
@@ -74,7 +76,7 @@ public class MeasureFilterDto {
return description;
}
- public MeasureFilterDto setDescription(String description) {
+ public MeasureFilterDto setDescription(@Nullable String description) {
this.description = description;
return this;
}