Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves #290 by supporting vararg nullability. Previously, we ignored the default nullability info of vararg arguments, but would error out if the vararg formal was deemed non-null by a handler. Instead, we now correctly acknowledge the non-null status of vararg arguments whether they are non-null due to default code assumptions or due to handlers (restrictive annotations, `@Contract`, etc). Note that we don't actually support checking methods taking `@Nullable` var args (e.g. we don't support `@Nullable` var args in methods defined in annotated code). Supporting that would require supporting nullability in generics/array elements, which NullAway currently punts on. Instead, we print a corresponding error in this case. This PR also adds tests and support for `javax.annotations.Nonnull` which we were ignoring before and is needed for those tests.
- Loading branch information
1 parent
18b386a
commit 401d048
Showing
5 changed files
with
146 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters