From bee6648340301c16053ec15ee4da1296839ead30 Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Thu, 5 Sep 2024 11:18:29 +0900 Subject: [PATCH] =?UTF-8?q?=EC=B2=98=EB=A6=AC=20=EB=A1=9C=EA=B7=B8=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xit/interfaces/lntris/InterfaceInfoReader.java | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/main/java/cokr/xit/interfaces/lntris/InterfaceInfoReader.java b/src/main/java/cokr/xit/interfaces/lntris/InterfaceInfoReader.java index f1b1706..f3b935f 100644 --- a/src/main/java/cokr/xit/interfaces/lntris/InterfaceInfoReader.java +++ b/src/main/java/cokr/xit/interfaces/lntris/InterfaceInfoReader.java @@ -105,7 +105,10 @@ public abstract class InterfaceInfoReader> extends }, receiptCount() ); - if (paths.isEmpty()) return Collections.emptyList(); + if (paths.isEmpty()) { + log().debug("No files found to process"); + return Collections.emptyList(); + } List fileStatus = paths.stream() .map(path -> { @@ -131,9 +134,13 @@ public abstract class InterfaceInfoReader> extends Map> successFail = fileStatus.stream() //처리 결과를 성공 / 실패로 분류 .collect(Collectors.groupingBy(FileStatus::isSuccess)); - List success = successFail.get(true); + List + success = successFail.get(true), + fail = successFail.get(false); + log().debug("success: {}, fail: {}", !isEmpty(success) ? success.size() : 0, !isEmpty(fail) ? fail.size() : 0); + move(FileStatus.getPaths(success), successDir()); // 성공 디렉토리로 이동 - move(FileStatus.getPaths(successFail.get(false)), failDir()); // 실패 디렉토리로 이동 + move(FileStatus.getPaths(fail), failDir()); // 실패 디렉토리로 이동 return isEmpty(success) ? Collections.emptyList() :