Add explicit null checks in OpenSslX509KeyManagerFactory#11230
Merged
normanmaurer merged 2 commits intonetty:4.1from May 7, 2021
Merged
Add explicit null checks in OpenSslX509KeyManagerFactory#11230normanmaurer merged 2 commits intonetty:4.1from
normanmaurer merged 2 commits intonetty:4.1from
Conversation
…slX509KeyManagerFactory Signed-off-by: xingrufei <xingrufei@sogou-inc.com>
hyperxpro
suggested changes
May 7, 2021
Contributor
hyperxpro
left a comment
There was a problem hiding this comment.
This will break API as users are not expecting NullPointerException to be thrown. @normanmaurer WDYT?
Member
|
@hyperxpro actually I think this is fine as otherwise it would also throw either NPE or something else once trying to use it. |
Member
|
@chrisvest WDYT ? |
chrisvest
reviewed
May 7, 2021
Member
|
The |
Signed-off-by: xingrufei <xingrufei@sogou-inc.com>
normanmaurer
pushed a commit
that referenced
this pull request
May 7, 2021
Motivation: We should add explicit null checks so its easier for people to understand why it throws. Modification: Add explicit checkNotNull(...) Result: Easier to understand for users why it fails. Signed-off-by: xingrufei <xingrufei@sogou-inc.com> Co-authored-by: xingrufei <xingrufei@sogou-inc.com>
raidyue
pushed a commit
to raidyue/netty
that referenced
this pull request
Jul 8, 2022
Motivation: We should add explicit null checks so its easier for people to understand why it throws. Modification: Add explicit checkNotNull(...) Result: Easier to understand for users why it fails. Signed-off-by: xingrufei <xingrufei@sogou-inc.com> Co-authored-by: xingrufei <xingrufei@sogou-inc.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation:
The return value of io.netty.handler.ssl.SslContext.toX509Certificates() may be null, so the non-null check is required for the return value
Modification:
Should do the non-null check on the return value of io.netty.handler.ssl.SslContext.toX509Certificates() in SslContext and OpenSslX509KeyManagerFactory, thanks
Result:
Added a non-null check for the return value of io.netty.handler.ssl.SslContext.toX509Certificates()