RED-6204: Simplified conversion of File to Path
This commit is contained in:
parent
9931b56b92
commit
196cd5934b
@ -3,7 +3,6 @@ package com.iqser.red.service.redaction.v1.server.tableextraction.utils;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
import lombok.experimental.UtilityClass;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@ -29,7 +28,7 @@ public class FileUtils {
|
||||
public void deleteFile(File file) {
|
||||
if (file != null) {
|
||||
try {
|
||||
Files.deleteIfExists(Path.of(file.toString()));
|
||||
Files.deleteIfExists(file.toPath());
|
||||
} catch (IOException ex) {
|
||||
log.warn("Could not delete file!", ex);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user