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 2021/10/20 12:30:48 UTC

[GitHub] [shardingsphere] puneetjakhar commented on a change in pull request #13169: Adding validation for invalid dataNode String

puneetjakhar commented on a change in pull request #13169:
URL: https://github.com/apache/shardingsphere/pull/13169#discussion_r732724533



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/datanode/DataNode.java
##########
@@ -55,7 +55,7 @@ public DataNode(final String dataNode) {
     }
     
     private static boolean isValidDataNode(final String dataNodeStr) {
-        return dataNodeStr.contains(DELIMITER) && 2 == Splitter.on(DELIMITER).splitToList(dataNodeStr).size();
+        return dataNodeStr.contains(DELIMITER) && 2 == Splitter.on(DELIMITER).splitToList(dataNodeStr).stream().filter(e -> e.length() != 0).count();

Review comment:
       @strongduanmu: Added, please review and enable workflow.




-- 
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