private static @NotNull Map<Long, String> getProcessOwners() {
    Map<Long, String> result = new HashMap<>();
    ProcessHandle.allProcesses().forEach(it -> {
      long pid = it.pid();
      ProcessHandle.Info info = it.info();
      String user = info.user().orElse(null);
      result.put(pid, user);
    });
    return result;
  }
private static @NotNull Map<Long, String> getProcessOwners()