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 /sonar-duplications | |
parent | ff4d30779e2b145efd7cc7ae8dee259721a7e20e (diff) | |
download | sonarqube-a00b76dd1b57d56fd06797b79b6b62bd1b5fcf9d.tar.gz sonarqube-a00b76dd1b57d56fd06797b79b6b62bd1b5fcf9d.zip |
Fix some quality flaws
Diffstat (limited to 'sonar-duplications')
-rw-r--r-- | sonar-duplications/src/main/java/org/sonar/duplications/DuplicationPredicates.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sonar-duplications/src/main/java/org/sonar/duplications/DuplicationPredicates.java b/sonar-duplications/src/main/java/org/sonar/duplications/DuplicationPredicates.java index a6e05179fae..ce38086485a 100644 --- a/sonar-duplications/src/main/java/org/sonar/duplications/DuplicationPredicates.java +++ b/sonar-duplications/src/main/java/org/sonar/duplications/DuplicationPredicates.java @@ -23,6 +23,8 @@ import com.google.common.annotations.Beta; import com.google.common.base.Predicate; import org.sonar.duplications.index.CloneGroup; +import javax.annotation.Nullable; + @Beta public final class DuplicationPredicates { @@ -40,8 +42,8 @@ public final class DuplicationPredicates { this.min = min; } - public boolean apply(CloneGroup input) { - return input.getLengthInUnits() >= min; + public boolean apply(@Nullable CloneGroup input) { + return input != null && input.getLengthInUnits() >= min; } } |