CalvinKirs commented on code in PR #3063:
URL:
https://github.com/apache/incubator-seatunnel/pull/3063#discussion_r993046520
##########
seatunnel-common/src/main/java/org/apache/seatunnel/common/utils/FileUtils.java:
##########
@@ -105,20 +105,20 @@ public static Long getFileLineNumber(@NonNull String
filePath) {
*/
public static Long getFileLineNumberFromDir(@NonNull String dirPath) {
File file = new File(dirPath);
- Long value = null;
if (file.isDirectory()) {
- value = Arrays.stream(file.listFiles()).map(currFile -> {
+ File[] files = file.listFiles();
+ if (files == null) {
+ return 0L;
+ }
+ return Arrays.stream(file.listFiles()).map(currFile -> {
Review Comment:
+1
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]