-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix no check if the parameter is null. #6775
Conversation
JokerSun
commented
Apr 13, 2019
•
edited
Loading
edited
@JokerSun Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@JokerSun Thank you for signing the Contributor License Agreement! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JokerSun, thanks for such a quick turnaround! I've left some feedback inline.
core/src/main/java/org/springframework/security/core/authority/AuthorityUtils.java
Outdated
Show resolved
Hide resolved
@jzheaux Thanks for your review, i guess your are right , and can you make some suggestion about strategy of 'null value' it's import for my developing, because i don't know when should i catch the null value or throw exception. |
Thanks, @JokerSun for the update! To answer your question about checking for null, remember that the more possible inputs you allow, the more you have to support. Ask yourself if it would be a normal use case to pass a null value to your method - if not, throw an Regarding your PR, will you please do some cleanup before it gets merged? It looks like there are five commits, but only one line changed. Can you make so that there is only one commit? And then please format the commit this way:
Thanks! |
@jzheaux I am sorry about reply later, i have clean the commits, and thanks for your suggestion very much. |
Thanks, again, @JokerSun! This has been merged into |