mirror of
https://github.com/fankes/moshi.git
synced 2025-10-19 16:09:21 +08:00
Add @Nullable to result of Types.nextAnnotations. (#298)
This commit is contained in:
committed by
Jesse Wilson
parent
c65b3bf1cb
commit
e59dbf4f96
@@ -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.");
|
||||
|
Reference in New Issue
Block a user