bumptech / bumptech/glide

Generated GlideOptions are missing annotations

Open
#2,774 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
35k
Forks
6.2k
Avg merge
1d 11h
Merged PRs (30d)
8

Description

**Glide Version**: 4.5.0-SNAPSHOT

**Integration libraries**: none

**Device/Android Version**: none

**Issue details / Repro steps / Use case background**: Just looking around and noticed that `com.bumptech.glide.request.RequestOptions#centerCrop` has a warning on it saying "overriding methods are missing `@NonNull`". I checked where and it turns out it's from APT code. `FlickrGlideExtension` defines some of those methods, I wonder if it should warn/fail during processing that it's missing an annotation, or just add it automatically. Probably latter since all `RequestOptions` returning methods are builders and need to chain. On the other hand not having `@NonNull` in the extension class allows to return null without warning.

**Glide load line / `GlideModule` (if any) / list Adapter code (if any)**:
https://github.com/bumptech/glide/blob/v4.4.0/samples/flickr/src/main/java/com/bumptech/glide/samples/flickr/FlickrGlideExtension.java

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.