[ 
https://issues.apache.org/jira/browse/FLINK-11867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated FLINK-11867:
-----------------------------------
    Labels: pull-request-available  (was: )

> mistaking in checking filePath's value
> --------------------------------------
>
>                 Key: FLINK-11867
>                 URL: https://issues.apache.org/jira/browse/FLINK-11867
>             Project: Flink
>          Issue Type: Bug
>          Components: Build System
>            Reporter: Tom Goong
>            Assignee: Tom Goong
>            Priority: Major
>              Labels: pull-request-available
>
> In class StreamExecutionEnvironment
>  
> {code:java}
> // code placeholder
> 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.");
> TextInputFormat format = new TextInputFormat(new Path(filePath));
> format.setFilesFilter(FilePathFilter.createDefaultFilter());
> TypeInformation<String> typeInfo = BasicTypeInfo.STRING_TYPE_INFO;
> format.setCharsetName(charsetName);
> return readFile(format, filePath, FileProcessingMode.PROCESS_ONCE, -1, 
> typeInfo);
> }
> {code}
>  
> the *Preconditions.checkNotNull(filePath.isEmpty(), "The file path must not 
> be empty.");* this will not work



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to