You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/06/11 05:40:35 UTC

[GitHub] [shardingsphere] big-mountain-z commented on a change in pull request #5992: fix issue#5893:

big-mountain-z commented on a change in pull request #5992:
URL: https://github.com/apache/shardingsphere/pull/5992#discussion_r438553572



##########
File path: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/rule/EncryptRule.java
##########
@@ -167,7 +167,23 @@ public String getCipherColumn(final String logicTable, final String logicColumn)
      * @return cipher column or not
      */
     public boolean isCipherColumn(final String tableName, final String columnName) {
-        return tables.containsKey(tableName) && tables.get(tableName).getCipherColumns().contains(columnName);
+        return tables.containsKey(tableName) && isCipherColumn(tables.get(tableName).getCipherColumns(), columnName);
+    }
+
+    /**
+     * Is cipher column or not.
+     *
+     * @param cipherColumns cipher columns
+     * @param columnName column name
+     * @return cipher column or not
+     */

Review comment:
       ok, I will make a change.

##########
File path: shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-common/src/main/java/org/apache/shardingsphere/encrypt/rule/EncryptRule.java
##########
@@ -167,7 +167,23 @@ public String getCipherColumn(final String logicTable, final String logicColumn)
      * @return cipher column or not
      */
     public boolean isCipherColumn(final String tableName, final String columnName) {
-        return tables.containsKey(tableName) && tables.get(tableName).getCipherColumns().contains(columnName);
+        return tables.containsKey(tableName) && isCipherColumn(tables.get(tableName).getCipherColumns(), columnName);
+    }
+
+    /**
+     * Is cipher column or not.
+     *
+     * @param cipherColumns cipher columns
+     * @param columnName column name
+     * @return cipher column or not
+     */
+    private boolean isCipherColumn(final Collection<String> cipherColumns, final String columnName) {
+        for (String each : cipherColumns) {

Review comment:
       ok, I will make a change.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org