Add `@Nullable` to changePassword parameters in `UserDetailsManager` by therepanic · Pull Request #18271 · spring-projects/spring-security

@therepanic

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

@therepanic

@therepanic

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

@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