You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by tu...@apache.org on 2022/11/22 09:46:08 UTC
[shardingsphere] branch master updated: Rename CommonChineseCharacters.dict to common_chinese_character.dict and move it to algorithm like directory (#22340)
This is an automated email from the ASF dual-hosted git repository.
tuichenchuxin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 6ca07516161 Rename CommonChineseCharacters.dict to common_chinese_character.dict and move it to algorithm like directory (#22340)
6ca07516161 is described below
commit 6ca07516161a1d533a0c61fedc679e8ed7430306
Author: Zhengqiang Duan <du...@apache.org>
AuthorDate: Tue Nov 22 17:46:00 2022 +0800
Rename CommonChineseCharacters.dict to common_chinese_character.dict and move it to algorithm like directory (#22340)
---
.../encrypt/algorithm/like/CharDigestLikeEncryptAlgorithm.java | 5 +++--
.../like/common_chinese_character.dict} | 0
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/like/CharDigestLikeEncryptAlgorithm.java b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/like/CharDigestLikeEncryptAlgorithm.java
index 5cfc7711699..bde8633a2f8 100644
--- a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/like/CharDigestLikeEncryptAlgorithm.java
+++ b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/algorithm/like/CharDigestLikeEncryptAlgorithm.java
@@ -36,6 +36,7 @@ import java.util.Properties;
/**
* Char digest like encrypt algorithm.
*/
+@SuppressWarnings("UnstableApiUsage")
public final class CharDigestLikeEncryptAlgorithm implements EncryptAlgorithm<Object, String> {
private static final String DELTA = "delta";
@@ -121,10 +122,10 @@ public final class CharDigestLikeEncryptAlgorithm implements EncryptAlgorithm<Ob
@SneakyThrows
private String initDefaultDict() {
- InputStream inputStream = CharDigestLikeEncryptAlgorithm.class.getClassLoader().getResourceAsStream("like/CommonChineseCharacters.dict");
+ InputStream inputStream = CharDigestLikeEncryptAlgorithm.class.getClassLoader().getResourceAsStream("algorithm/like/common_chinese_character.dict");
LineProcessor<String> lineProcessor = new LineProcessor<String>() {
- private StringBuilder builder = new StringBuilder();
+ private final StringBuilder builder = new StringBuilder();
@Override
public boolean processLine(final String line) {
diff --git a/features/encrypt/core/src/main/resources/like/CommonChineseCharacters.dict b/features/encrypt/core/src/main/resources/algorithm/like/common_chinese_character.dict
similarity index 100%
rename from features/encrypt/core/src/main/resources/like/CommonChineseCharacters.dict
rename to features/encrypt/core/src/main/resources/algorithm/like/common_chinese_character.dict