uber/NullAway

Disallow writing `@Initializer` on constructors

Closed

#540 opened on Jan 6, 2022

 (0 comments) (0 reactions) (0 assignees)Java (288 forks)batch import
good first issue

Repository metrics

Stars
 (3,462 stars)
PR merge metrics
 (Avg merge 3d 23h) (14 merged PRs in 30d)

Description

If a constructor is annotated with @Initializer, NullAway currently treats the constructor as if it were an initializer method that runs after any constructor, which clearly doesn't make sense. Instead, NullAway should report an error, as this is an invalid use of @Initializer.

Contributor guide