Feat: add static analytic of code
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user