-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
The IntelliJ `@Contract` annotation has two fields, `value` and `pure`. When `pure = true`, `value` can be left empty. As such, the following is a valid `@Contract` annotation: ``` @contract( pure = true ) ``` See. https://www.jetbrains.com/help/idea/contract-annotations.html Here, retriving the annotation value produces an empty string. However, existing ContractHandler logic expects `value` to either be `null` or a properly formated string in IntelliJ contract syntax (`"[...] -> [...]; [...]"`). Previous to this change, NullAway would report an error AND crash when seeing the `@Contract` annotation above, rather than ignore it. This patch fixes this.
- Loading branch information
1 parent
af24db1
commit 875cf56
Showing
2 changed files
with
41 additions
and
1 deletion.
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