Skip to content

Conversation

@msridhar
Copy link
Contributor

@msridhar msridhar commented Dec 19, 2025

The new warnings are a consequence of uber/NullAway#1371, which better detects annotations on type arguments in return types.

Fortunately, the fixes are straightforward. Note that writing @Nullable Void is required by JSpecify (see jspecify/jspecify#51). This is not yet checked exhaustively by NullAway, but some instances were caught here.

@msridhar
Copy link
Contributor Author

FYI @sdeleuze

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Dec 19, 2025
@msridhar msridhar force-pushed the nullaway-0.12.15-fixes branch 2 times, most recently from b39f321 to b4ec0ad Compare December 21, 2025 23:57
@snicoll snicoll added the status: on-hold We can't start working on this issue yet label Dec 23, 2025
@snicoll
Copy link
Member

snicoll commented Dec 23, 2025

I don't think we should upgrade just yet even if this works for framework, see spring-gradle-plugins/nullability-plugin#25

@msridhar
Copy link
Contributor Author

Hi @snicoll thanks, I commented on the NullAway issue you opened. It might be reasonable to change the nullability-plugin to not enable RequireExplicitNullMarking checking by default, if it's too surprising for users; people could opt in to it instead. But I think that's independent of the NullAway 0.12.15 release.

For context, I'm interested in getting Spring Framework upgraded to NullAway 0.12.15 since we use it as an integration test for NullAway, and that integration test has been failing due to the new warnings that this PR fixes. Nothing critical, though.

@msridhar msridhar force-pushed the nullaway-0.12.15-fixes branch from b4ec0ad to 88dd275 Compare December 25, 2025 00:36
Signed-off-by: Manu Sridharan <msridhar@gmail.com>
@msridhar msridhar force-pushed the nullaway-0.12.15-fixes branch from 88dd275 to f33fae5 Compare December 25, 2025 21:02
@snicoll snicoll removed the status: on-hold We can't start working on this issue yet label Dec 26, 2025
@sdeleuze sdeleuze self-assigned this Dec 29, 2025
@sdeleuze sdeleuze removed the status: waiting-for-triage An issue we've not yet triaged or decided on label Dec 29, 2025
@sdeleuze sdeleuze added this to the 7.0.3 milestone Dec 29, 2025
@sdeleuze sdeleuze added type: enhancement A general enhancement status: blocked An issue that's blocked on an external project change labels Dec 29, 2025
@sdeleuze
Copy link
Contributor

Thanks @msridhar, the code changes LGTM, but I will wait the release of https://github.com/spring-gradle-plugins/nullability-plugin/milestone/9 to merge it instead of the NullAway version override.

I have tagged this issue as en enhancement as it will refine the nullability of some of our public APIs.

sdeleuze added a commit to sdeleuze/spring-framework that referenced this pull request Dec 29, 2025
This commit also replaces Arch Unit packageInfoShouldBeNullMarked() rule
by either configuring requireExplicitNullMarking = false when the whole
module does not have JSpecify annotations, or explicit @NullUnmarked
when some have and some don't.

See spring-projectsgh-36054
sdeleuze added a commit to sdeleuze/spring-framework that referenced this pull request Dec 29, 2025
@snicoll snicoll removed the status: blocked An issue that's blocked on an external project change label Dec 29, 2025
@sdeleuze sdeleuze closed this in d36244e Dec 29, 2025
@sdeleuze
Copy link
Contributor

@rstoyanchev While changing how we check @NullMarked packages to leverage spring-gradle-plugins/nullability-plugin#23, I found that the org.springframework.test.web.support package was not annotated, so I changed that. Please give it a look to verify everything looks ok from a nullability perspective.

@msridhar msridhar deleted the nullaway-0.12.15-fixes branch December 29, 2025 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants