Skip to content

Fix equals nullability annotations for jspecify compliance#18930

Merged
jzheaux merged 1 commit intospring-projects:mainfrom
therepanic:jspecify-nullable-on-equals
Mar 23, 2026
Merged

Fix equals nullability annotations for jspecify compliance#18930
jzheaux merged 1 commit intospring-projects:mainfrom
therepanic:jspecify-nullable-on-equals

Conversation

@therepanic
Copy link
Contributor

In this commit, we added @Nullable to equals methods of classes that support jspecify for consistency with other Spring projects and to avoid bugs that caused other Spring projects to do this natively.

Closes: gh-18929

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 18, 2026
Copy link
Contributor

@jzheaux jzheaux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @therepanic, for the PR and the underlying research that went into it.

Does this also close #18927? If so, you may consider adding that Closes to your commit as well. Otherwise, will you please elaborate on that ticket what work is needed in addition to this PR?

@jzheaux jzheaux self-assigned this Mar 21, 2026
@jzheaux jzheaux added in: core An issue in spring-security-core type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 21, 2026
@jzheaux jzheaux added this to the 7.1.0-RC1 milestone Mar 21, 2026
@jzheaux jzheaux added the status: waiting-for-feedback We need additional information before we can continue label Mar 21, 2026
@therepanic therepanic force-pushed the jspecify-nullable-on-equals branch 3 times, most recently from 1a9e130 to 901d7d9 Compare March 22, 2026 13:26
@therepanic
Copy link
Contributor Author

Thanks for the great review, @jzheaux. I polished everything up and pushed it.

Yes, that closes #18927, I included it in the commit message.

@therepanic therepanic requested a review from jzheaux March 22, 2026 13:31
@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Mar 22, 2026
In this commit, we added `@Nullable` to equals methods of classes that
support `jspecify` for consistency with other Spring projects and to
avoid bugs that caused other Spring projects to do this natively.

Closes: spring-projectsgh-18929, spring-projectsgh-18927

Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
@jzheaux jzheaux force-pushed the jspecify-nullable-on-equals branch from 901d7d9 to cf51b82 Compare March 23, 2026 14:09
@jzheaux
Copy link
Contributor

jzheaux commented Mar 23, 2026

Nice, @therepanic! Thanks for the updates. This will merge into main once the build completes.

@jzheaux jzheaux removed the status: feedback-provided Feedback has been provided label Mar 23, 2026
@jzheaux jzheaux merged commit 2fda37d into spring-projects:main Mar 23, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: core An issue in spring-security-core type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

All equals methods with jspecify support must have a Nullable argument

3 participants