Skip to content

Commit

Permalink
#27799 Handling nulls
Browse files Browse the repository at this point in the history
  • Loading branch information
jgambarios committed May 1, 2024
1 parent e245d26 commit 3bb55d0
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ public class AuthenticationParamContextImpl implements AuthenticationParam {

@Override
public void setToken(final char[] token) {
this.token = Arrays.copyOf(token, token.length);
if (null != token) {
this.token = Arrays.copyOf(token, token.length);
} else {
this.token = null;
}
}

public Optional<char[]> getToken() {
Expand Down

0 comments on commit 3bb55d0

Please sign in to comment.