You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "RaigorJiang (via GitHub)" <gi...@apache.org> on 2023/04/24 08:33:12 UTC

[GitHub] [shardingsphere] RaigorJiang commented on a diff in pull request #25300: Improve properties check of DataMatchDataConsistencyCalculateAlgorithm

RaigorJiang commented on code in PR #25300:
URL: https://github.com/apache/shardingsphere/pull/25300#discussion_r1174956985


##########
kernel/data-pipeline/core/src/main/java/org/apache/shardingsphere/data/pipeline/core/check/consistency/algorithm/DataMatchDataConsistencyCalculateAlgorithm.java:
##########
@@ -78,7 +78,12 @@ public void init(final Properties props) {
     }
     
     private int getChunkSize(final Properties props) {
-        int result = Integer.parseInt(props.getProperty(CHUNK_SIZE_KEY, DEFAULT_CHUNK_SIZE + ""));
+        int result;
+        try {
+            result = Integer.parseInt(props.getProperty(CHUNK_SIZE_KEY, DEFAULT_CHUNK_SIZE + ""));
+        } catch (final NumberFormatException ex) {

Review Comment:
   When a `NumberFormatException` occurs, there is no prompt, and the user has no way of knowing that the configuration is wrong.



-- 
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: notifications-unsubscribe@shardingsphere.apache.org

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