Skip to content

Add @Nullable to changePassword parameters in UserDetailsManager#18271

Merged
rwinch merged 1 commit intospring-projects:mainfrom
therepanic:gh-18257
Jan 23, 2026
Merged

Add @Nullable to changePassword parameters in UserDetailsManager#18271
rwinch merged 1 commit intospring-projects:mainfrom
therepanic:gh-18257

Conversation

@therepanic
Copy link
Copy Markdown
Contributor

Also, an unused argument was removed from JdbcUserDetailsManager#createNewAuthentication that was not used and would break the build of the current change.

Closes: gh-18257

Closes: spring-projectsgh-18257

Signed-off-by: Andrey Litvitski <andrey1010102008@gmail.com>
@therepanic
Copy link
Copy Markdown
Contributor Author

Since there's a test that checks protected JdbcUserDetailsManager#createNewAuthentication with a password (currently a pointless test), I decided to annotate it with @Nullable instead of deleting it.

On the other hand, it might be better to delete the test, since again, the argument isn't used and it's a protected method. WDYT?

@rwinch rwinch self-assigned this Jan 23, 2026
@rwinch rwinch added in: build An issue in the build in: core An issue in spring-security-core type: enhancement A general enhancement labels Jan 23, 2026
@rwinch rwinch added this to the 7.1.0-M2 milestone Jan 23, 2026
@rwinch rwinch merged commit 0a182f1 into spring-projects:main Jan 23, 2026
6 checks passed
@rwinch
Copy link
Copy Markdown
Member

rwinch commented Jan 23, 2026

@therepanic Thank you for the pull request this is now merged into main 😄

On the other hand, it might be better to delete the test, since again, the argument isn't used and it's a protected method. WDYT?

I think it is good to have the test since we don't want to test based upon implementation details (that the argument isn't used) and we want to test protected methods since users can pass in values to it

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

Labels

in: build An issue in the build in: core An issue in spring-security-core status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UserDetailsManager should support password change with nulls

3 participants