Add @Nullable to result of Types.nextAnnotations. (#298)

This commit is contained in:
Eric Cochran
2017-05-06 18:07:59 -07:00
committed by Jesse Wilson
parent c65b3bf1cb
commit e59dbf4f96

View File

@@ -48,7 +48,8 @@ public final class Types {
* Returns the subset of {@code annotations} without {@code jsonQualifier}, or null if {@code
* annotations} does not contain {@code jsonQualifier}.
*/
public static Set<? extends Annotation> nextAnnotations(Set<? extends Annotation> annotations,
public static @Nullable Set<? extends Annotation> nextAnnotations(
Set<? extends Annotation> annotations,
Class<? extends Annotation> jsonQualifier) {
if (!jsonQualifier.isAnnotationPresent(JsonQualifier.class)) {
throw new IllegalArgumentException(jsonQualifier + " is not a JsonQualifier.");