Code formating

This commit is contained in:
Laurent Clouet
2017-01-05 09:35:59 +01:00
parent 52e5f190c7
commit 2f00d7816d
12 changed files with 27 additions and 28 deletions

View File

@@ -65,7 +65,7 @@ public abstract class OS {
else if (os.contains("nix") || os.contains("nux")) {
return new Linux();
}
else if(os.contains("freebsd")){
else if (os.contains("freebsd")) {
return new FreeBSD();
}
else {

View File

@@ -220,5 +220,5 @@ public interface Kernel32Lib extends Library {
* @return If the function succeeds, the return value is the thread's previous affinity mask.
*/
public boolean SetProcessAffinityMask(HANDLE hProcess, DWORD_PTR dwProcessAffinityMask);
}

View File

@@ -83,11 +83,11 @@ public class WinProcess {
public WinProcess(int pid_) throws IOException {
this();
this.handle = Kernel32.INSTANCE.OpenProcess(0x0400 | // PROCESS_QUERY_INFORMATION
0x0800 | // PROCESS_SUSPEND_RESUME
0x0001 | // PROCESS_TERMINATE
0x0200 | // PROCESS_SET_INFORMATION
0x00100000, // SYNCHRONIZE
false, pid_);
0x0800 | // PROCESS_SUSPEND_RESUME
0x0001 | // PROCESS_TERMINATE
0x0200 | // PROCESS_SET_INFORMATION
0x00100000, // SYNCHRONIZE
false, pid_);
if (this.handle == null) {
throw new IOException("OpenProcess failed: " + Kernel32Util.formatMessageFromLastErrorCode(Kernel32.INSTANCE.GetLastError()) + " (pid: " + pid_ + ")");
}