aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-05-25 15:51:44 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2012-05-25 15:51:44 +0200
commita00b76dd1b57d56fd06797b79b6b62bd1b5fcf9d (patch)
tree3adb51e49beeacdb2d4d52b99444ac5094d8ac1f /plugins
parentff4d30779e2b145efd7cc7ae8dee259721a7e20e (diff)
downloadsonarqube-a00b76dd1b57d56fd06797b79b6b62bd1b5fcf9d.tar.gz
sonarqube-a00b76dd1b57d56fd06797b79b6b62bd1b5fcf9d.zip
Fix some quality flaws
Diffstat (limited to 'plugins')
-rw-r--r--plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ReviewWorkflowDecorator.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ReviewWorkflowDecorator.java b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ReviewWorkflowDecorator.java
index 3e27ee2f61b..b5195812e8e 100644
--- a/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ReviewWorkflowDecorator.java
+++ b/plugins/sonar-core-plugin/src/main/java/org/sonar/plugins/core/sensors/ReviewWorkflowDecorator.java
@@ -38,6 +38,7 @@ import org.sonar.core.NotDryRun;
import org.sonar.core.review.ReviewDao;
import org.sonar.core.review.ReviewDto;
+import javax.annotation.Nullable;
import java.util.*;
@NotDryRun
@@ -164,8 +165,8 @@ public class ReviewWorkflowDecorator implements Decorator {
}
private static final class ViolationToPermanentIdFunction implements Function<Violation, Integer> {
- public Integer apply(Violation violation) {
- return violation.getPermanentId();
+ public Integer apply(@Nullable Violation violation) {
+ return (violation != null ? violation.getPermanentId() : null);
}
}
}