Skip to content

Commit

Permalink
Simplify find query encryptor method (#33842)
Browse files Browse the repository at this point in the history
  • Loading branch information
FlyingZC authored Nov 29, 2024
1 parent 01dfad9 commit 8d76fc7
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,6 @@ public boolean isLikeQueryColumn(final String columnName) {
*/
@HighFrequencyInvocation
public Optional<EncryptAlgorithm> findQueryEncryptor(final String columnName) {
if (!isEncryptColumn(columnName)) {
return Optional.empty();
}
return Optional.of(getEncryptColumn(columnName).getQueryEncryptor());
return isEncryptColumn(columnName) ? Optional.of(getEncryptColumn(columnName).getQueryEncryptor()) : Optional.empty();
}
}

0 comments on commit 8d76fc7

Please sign in to comment.