Pace2Car commented on code in PR #25041:
URL: https://github.com/apache/shardingsphere/pull/25041#discussion_r1186985081
##########
features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/replace/UnifiedCreditCodeRandomReplaceAlgorithm.java:
##########
@@ -60,16 +60,19 @@ public void init(final Properties props) {
}
private List<Character> createRegistrationDepartmentCodes(final Properties
props) {
+ MaskAlgorithmPropsChecker.checkRequiredPropertyConfig(props,
REGISTRATION_DEPARTMENT_CODES, getType());
Review Comment:
Unnecessary check, repeated in checkAtLeastOneCharConfig
##########
features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/replace/UnifiedCreditCodeRandomReplaceAlgorithm.java:
##########
@@ -60,16 +60,19 @@ public void init(final Properties props) {
}
private List<Character> createRegistrationDepartmentCodes(final Properties
props) {
+ MaskAlgorithmPropsChecker.checkRequiredPropertyConfig(props,
REGISTRATION_DEPARTMENT_CODES, getType());
MaskAlgorithmPropsChecker.checkAtLeastOneCharConfig(props,
REGISTRATION_DEPARTMENT_CODES, getType());
return
Splitter.on(",").trimResults().splitToList(props.getProperty(REGISTRATION_DEPARTMENT_CODES)).stream().map(each
-> each.charAt(0)).collect(Collectors.toList());
}
private List<Character> createCategoryCodes(final Properties props) {
+ MaskAlgorithmPropsChecker.checkRequiredPropertyConfig(props,
CATEGORY_CODES, getType());
Review Comment:
as same
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]