[ https://issues.apache.org/jira/browse/FLINK-11867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chesnay Schepler updated FLINK-11867: ------------------------------------- Component/s: API / DataStream > Fix empty path check in StreamExEnv#readTextFile > ------------------------------------------------ > > Key: FLINK-11867 > URL: https://issues.apache.org/jira/browse/FLINK-11867 > Project: Flink > Issue Type: Bug > Components: API / DataStream > Reporter: Tom Goong > Assignee: Tom Goong > Priority: Major > Labels: pull-request-available > Fix For: 1.7.3, 1.8.0 > > Time Spent: 20m > Remaining Estimate: 0h > > 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)