diff --git a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rule/table/EncryptTable.java b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rule/table/EncryptTable.java index 629649cde021c..646e4b02efd43 100644 --- a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rule/table/EncryptTable.java +++ b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rule/table/EncryptTable.java @@ -176,9 +176,6 @@ public boolean isLikeQueryColumn(final String columnName) { */ @HighFrequencyInvocation public Optional 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(); } }