Skip to content

Commit

Permalink
[ISSUE #8906] Handle string toUpperCase outside the loop
Browse files Browse the repository at this point in the history
  • Loading branch information
mawen12 authored Nov 12, 2024
1 parent 7eb16ff commit 2bbc852
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ private static ClientAuth parseClientAuthMode(String authMode) {
return ClientAuth.NONE;
}

String authModeUpper = authMode.toUpperCase();
for (ClientAuth clientAuth : ClientAuth.values()) {
if (clientAuth.name().equals(authMode.toUpperCase())) {
if (clientAuth.name().equals(authModeUpper)) {
return clientAuth;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,9 @@ private static ClientAuth parseClientAuthMode(String authMode) {
return ClientAuth.NONE;
}

String authModeUpper = authMode.toUpperCase();
for (ClientAuth clientAuth : ClientAuth.values()) {
if (clientAuth.name().equals(authMode.toUpperCase())) {
if (clientAuth.name().equals(authModeUpper)) {
return clientAuth;
}
}
Expand Down

0 comments on commit 2bbc852

Please sign in to comment.