Add `@Nullable` to changePassword parameters in `UserDetailsManager` by therepanic · Pull Request #18271 · spring-projects/spring-security
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
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?
@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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters