diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-05-25 15:51:44 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-05-25 15:51:44 +0200 |
commit | a00b76dd1b57d56fd06797b79b6b62bd1b5fcf9d (patch) | |
tree | 3adb51e49beeacdb2d4d52b99444ac5094d8ac1f /plugins | |
parent | ff4d30779e2b145efd7cc7ae8dee259721a7e20e (diff) | |
download | sonarqube-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.java | 5 |
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); } } } |