mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-14 10:34:06 +02:00
refactor: replace legacy Paths usage with Path.of (#6441)
This commit is contained in:
@@ -12,7 +12,7 @@ public class PropSync {
|
||||
File folder = new File("C:\\Users\\systo\\git\\Stirling-PDF\\app\\core\\src\\main\\resources");
|
||||
File[] files = folder.listFiles((dir, name) -> name.matches("messages_.*\\.properties"));
|
||||
|
||||
List<String> enLines = Files.readAllLines(Paths.get(folder + "\\messages_en_GB.properties"), StandardCharsets.UTF_8);
|
||||
List<String> enLines = Files.readAllLines(Path.of(folder + "\\messages_en_GB.properties"), StandardCharsets.UTF_8);
|
||||
Map<String, String> enProps = linesToProps(enLines);
|
||||
|
||||
for (File file : files) {
|
||||
|
||||
@@ -19,9 +19,9 @@ public class RestartHelper {
|
||||
Map<String, String> cli = parseArgs(args);
|
||||
|
||||
long pid = Long.parseLong(req(cli, "pid"));
|
||||
Path appJar = Paths.get(req(cli, "app")).toAbsolutePath().normalize();
|
||||
Path appJar = Path.of(req(cli, "app")).toAbsolutePath().normalize();
|
||||
String javaBin = cli.getOrDefault("java", "java");
|
||||
Path argsFile = cli.containsKey("argsFile") ? Paths.get(cli.get("argsFile")) : null;
|
||||
Path argsFile = cli.containsKey("argsFile") ? Path.of(cli.get("argsFile")) : null;
|
||||
long backoffMs = Long.parseLong(cli.getOrDefault("backoffMs", "1000"));
|
||||
|
||||
if (!Files.isRegularFile(appJar)) {
|
||||
|
||||
Reference in New Issue
Block a user