OS: Android
What steps will reproduce the problem?
(1) Add @Nullable
What is the expected result?
@Nullable is added automatically.
What happens instead?
The developer is confused as to which annotation to import, maybe android.support.annotation.Nullable or javax.annotation.Nullable, or even might be confused with android.annotation.Nullable. The developer then adds a random choice.
What should we do?
Ensure we always use android.support.annotation.Nullable since it is not retained at runtime, and up until now, we have not had use for it at runtime.
Tasks:
- Add to Java styleguide //styleguide/java/java.md
- Add a presubmit to ensure we always use it for new code.
- Bonus: Update IDE configurations to make them include the correct annotation.
Comment 1 by bugdroid1@chromium.org
, Dec 5