Skip to content

Add missing @Nullable type annotation to Iterator declaration#36910

Closed
subhramit wants to merge 1 commit into
spring-projects:mainfrom
subhramit:fix-nullwarnings
Closed

Add missing @Nullable type annotation to Iterator declaration#36910
subhramit wants to merge 1 commit into
spring-projects:mainfrom
subhramit:fix-nullwarnings

Conversation

@subhramit

@subhramit subhramit commented Jun 12, 2026

Copy link
Copy Markdown

Context

Nullaway had a warning highlighted in https://github.com/uber/NullAway/actions/runs/27324825986/job/80868514610.
On taking a look, it seemed to have merit.

In the covered code:

private final Iterator<Object> valueIterator;
public VarArgsTemplateVariables(@Nullable Object... uriVariableValues) {
this.valueIterator = Arrays.asList(uriVariableValues).iterator();
}

The varargs param is @Nullable Object..., so Arrays.asList(uriVariableValues) is List<@Nullable Object> and .iterator() is Iterator<@Nullable Object>, but the field is declared Iterator<Object>.

The PR aligns the type signatures by adding the missing @Nullable annotation to the declaration.

Signed-off-by: subhramit <subhramit.bb@live.in>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 12, 2026
@subhramit subhramit changed the title Add missing @Nullable type annotation to field declaration Add missing @Nullable type annotation to Iterator declaration Jun 12, 2026
@subhramit

Copy link
Copy Markdown
Author

Closing as covered by #36850.

@subhramit subhramit closed this Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged or decided on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants