Skip to content

Fix equals nullability annotations for jspecify compliance#18930

Open
therepanic wants to merge 1 commit intospring-projects:mainfrom
therepanic:jspecify-nullable-on-equals
Open

Fix equals nullability annotations for jspecify compliance#18930
therepanic wants to merge 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

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

Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 18, 2026
Comment on lines +106 to +107
if (obj == null) {
return false;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In some places this is necessary, otherwise the project will not build.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

All equals methods with jspecify support must have a Nullable argument

2 participants