aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-duplications
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-duplications')
-rw-r--r--sonar-duplications/src/main/java/org/sonar/duplications/DuplicationPredicates.java6
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;
}
}