Skip to content

Commit

Permalink
Adding a null check to avoid NPE
Browse files Browse the repository at this point in the history
Because Predicate (from Guava) are annotated with `Nullable` and allow null values.
  • Loading branch information
garcia-jj committed Aug 14, 2015
1 parent d61a977 commit 54e6280
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private static Predicate<Annotation> acceptsConstraintMatcher() {
return new Predicate<Annotation>() {
@Override
public boolean apply(Annotation element) {
return element.annotationType().isAnnotationPresent(AcceptsConstraint.class);
return element != null && element.annotationType().isAnnotationPresent(AcceptsConstraint.class);
}
};
}
Expand Down

0 comments on commit 54e6280

Please sign in to comment.