Pace2Car commented on code in PR #25041:
URL: https://github.com/apache/shardingsphere/pull/25041#discussion_r1186987044
##########
features/mask/core/src/main/java/org/apache/shardingsphere/mask/algorithm/cover/KeepFromXToYMaskAlgorithm.java:
##########
@@ -48,18 +48,20 @@ public void init(final Properties props) {
}
private Integer createFromX(final Properties props) {
- MaskAlgorithmPropsChecker.checkIntegerTypeConfig(props, FROM_X,
getType());
- return Integer.parseInt(props.getProperty(FROM_X));
+ MaskAlgorithmPropsChecker.checkPositiveIntegerConfig(props, FROM_X,
getType());
+ return Integer.valueOf(props.getProperty(FROM_X));
}
private Integer createToY(final Properties props) {
- MaskAlgorithmPropsChecker.checkIntegerTypeConfig(props, TO_Y,
getType());
- return Integer.parseInt(props.getProperty(TO_Y));
+ MaskAlgorithmPropsChecker.checkPositiveIntegerConfig(props, TO_Y,
getType());
+ return Integer.valueOf(props.getProperty(TO_Y));
}
private Character createReplaceChar(final Properties props) {
+ String replaceCharStr = props.getProperty(REPLACE_CHAR);
+ MaskAlgorithmPropsChecker.checkRequiredPropertyConfig(props,
REPLACE_CHAR, getType());
Review Comment:
Unnecessary check, just keep it as it is
--
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]