Skip to content

Ignore nested type annotations when computing variable nullability. - #2908

Open
copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1014136548
Open

copybara-service[bot] wants to merge 1 commit into
masterfrom
test_1014136548

Conversation

@copybara-service

Copy link
Copy Markdown

Ignore nested type annotations when computing variable nullability.

hasNullabilityAnnotation scanned all type attributes of a variable, so
annotations on nested positions (e.g. List<@Nullable String> or
@Nullable String[]) made the variable itself nullable. Only the top-level
annotations of the variable type are considered now, as is already done for
method return types.

`hasNullabilityAnnotation` scanned all type attributes of a variable, so
annotations on nested positions (e.g. `List<@nullable String>` or
`@Nullable String[]`) made the variable itself nullable. Only the top-level
annotations of the variable type are considered now, as is already done for
method return types.

PiperOrigin-RevId: 1014136548

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant