spotlessApply 적용

This commit is contained in:
2025-12-03 18:48:13 +09:00
parent 7884416e75
commit 767a11559f
4 changed files with 20 additions and 27 deletions

View File

@@ -1,6 +1,5 @@
package com.kamco.cd.kamcoback.common.utils; package com.kamco.cd.kamcoback.common.utils;
import java.util.regex.Matcher; import java.util.regex.Matcher;
import java.util.regex.Pattern; import java.util.regex.Pattern;
@@ -12,7 +11,6 @@ public class NameValidator {
private static final String WHITESPACE_REGEX = ".*\\s.*"; private static final String WHITESPACE_REGEX = ".*\\s.*";
private static final Pattern WHITESPACE_PATTERN = Pattern.compile(WHITESPACE_REGEX); private static final Pattern WHITESPACE_PATTERN = Pattern.compile(WHITESPACE_REGEX);
public static boolean containsKorean(String str) { public static boolean containsKorean(String str) {
if (str == null || str.isEmpty()) { if (str == null || str.isEmpty()) {
return false; return false;
@@ -21,7 +19,6 @@ public class NameValidator {
return matcher.matches(); return matcher.matches();
} }
public static boolean containsWhitespaceRegex(String str) { public static boolean containsWhitespaceRegex(String str) {
if (str == null || str.isEmpty()) { if (str == null || str.isEmpty()) {
return false; return false;
@@ -43,6 +40,4 @@ public class NameValidator {
return false; return false;
} }
} }

View File

@@ -3,7 +3,6 @@ package com.kamco.cd.kamcoback.mapsheet;
import com.kamco.cd.kamcoback.code.dto.CommonCodeDto; import com.kamco.cd.kamcoback.code.dto.CommonCodeDto;
import com.kamco.cd.kamcoback.code.service.CommonCodeService; import com.kamco.cd.kamcoback.code.service.CommonCodeService;
import com.kamco.cd.kamcoback.config.api.ApiResponseDto; import com.kamco.cd.kamcoback.config.api.ApiResponseDto;
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto;
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.FilesDto; import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.FilesDto;
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.FoldersDto; import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.FoldersDto;
import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.SrchFilesDto; import com.kamco.cd.kamcoback.mapsheet.dto.FileDto.SrchFilesDto;

View File

@@ -70,7 +70,8 @@ public class FileDto {
private final int folderErrTotCnt; private final int folderErrTotCnt;
private final List<FolderDto> folders; private final List<FolderDto> folders;
public FoldersDto(String dirPath, int folderTotCnt, int folderErrTotCnt, List<FolderDto> folders) { public FoldersDto(
String dirPath, int folderTotCnt, int folderErrTotCnt, List<FolderDto> folders) {
this.dirPath = dirPath; this.dirPath = dirPath;
this.folderTotCnt = folderTotCnt; this.folderTotCnt = folderTotCnt;
@@ -79,8 +80,6 @@ public class FileDto {
} }
} }
@Schema(name = "File Basic", description = "파일 기본 정보") @Schema(name = "File Basic", description = "파일 기본 정보")
@Getter @Getter
public static class Basic { public static class Basic {

View File

@@ -37,7 +37,6 @@ public class MapSheetMngService {
private final MapSheetMngCoreService mapSheetMngCoreService; private final MapSheetMngCoreService mapSheetMngCoreService;
public FoldersDto getFolderAll(SrchFoldersDto srchDto) { public FoldersDto getFolderAll(SrchFoldersDto srchDto) {
Path startPath = Paths.get(srchDto.getDirPath()); Path startPath = Paths.get(srchDto.getDirPath());
@@ -68,8 +67,8 @@ public class MapSheetMngService {
String fullPath = path.toAbsolutePath().toString(); String fullPath = path.toAbsolutePath().toString();
boolean isValid = true; boolean isValid = true;
if( NameValidator.containsKorean(folderNm) || if (NameValidator.containsKorean(folderNm)
NameValidator.containsWhitespaceRegex(folderNm) ){ || NameValidator.containsWhitespaceRegex(folderNm)) {
isValid = false; isValid = false;
} }
@@ -99,8 +98,7 @@ public class MapSheetMngService {
depth, depth,
childCnt, childCnt,
lastModified, lastModified,
isValid isValid);
);
return folderDto; return folderDto;
}) })
@@ -114,7 +112,9 @@ public class MapSheetMngService {
folderTotCnt = folderDtoList.size(); folderTotCnt = folderDtoList.size();
folderErrTotCnt = (int)folderDtoList.stream() folderErrTotCnt =
(int)
folderDtoList.stream()
.filter(dto -> dto.getIsValid().toString().equals("false")) .filter(dto -> dto.getIsValid().toString().equals("false"))
.count(); .count();