Myasuka commented on a change in pull request #7947: [FLINK-11867][Build 
System]Mistaking in checking filePath's value
URL: https://github.com/apache/flink/pull/7947#discussion_r264007594
 
 

 ##########
 File path: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/environment/StreamExecutionEnvironment.java
 ##########
 @@ -958,8 +959,7 @@ public TimeCharacteristic getStreamTimeCharacteristic() {
         * @return The data stream that represents the data read from the given 
file as text lines
         */
        public DataStreamSource<String> readTextFile(String filePath, String 
charsetName) {
-               Preconditions.checkNotNull(filePath, "The file path must not be 
null.");
-               Preconditions.checkNotNull(filePath.isEmpty(), "The file path 
must not be empty.");
+               
Preconditions.checkArgument(!StringUtils.isNullOrWhitespaceOnly(filePath), "The 
file path must not be blank.");
 
 Review comment:
   How about change the error message to `The file path must not be null or 
blank.`

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to