Feat: add static analytic of code

This commit is contained in:
Laurent Clouet
2024-06-03 14:02:30 +00:00
parent c966a1a032
commit 4bce6409e3
52 changed files with 249 additions and 316 deletions

View File

@@ -53,10 +53,10 @@ public class Windows extends OS {
kernel32lib = (Kernel32Lib) Native.load(Kernel32Lib.path, Kernel32Lib.class);
kernel32lib.SetErrorMode(Kernel32Lib.SEM_NOGPFAULTERRORBOX);
}
catch (java.lang.UnsatisfiedLinkError e) {
catch (UnsatisfiedLinkError e) {
System.out.println("OS.Windows::exec failed to load kernel32lib " + e);
}
catch (java.lang.ExceptionInInitializerError e) {
catch (ExceptionInInitializerError e) {
System.out.println("OS.Windows::exec failed to load kernel32lib " + e);
}
catch (Exception e) {
@@ -192,7 +192,7 @@ public class Windows extends OS {
try {
// Shutdown the computer, waiting delayInMinutes minutes, force app closure and on the shutdown screen indicate that was initiated by SheepIt app
ProcessBuilder builder = new ProcessBuilder("shutdown", "/s", "/f", "/t", String.valueOf(delayInMinutes * 60), "/c", "\"SheepIt App has initiated this computer shutdown.\"");
Process process = builder.inheritIO().start();
builder.inheritIO().start();
}
catch (IOException e) {
System.err.println(