private static void preprocessEvent(SuspendContextImpl suspendContext, ThreadReference thread) {
    ThreadReferenceProxyImpl oldThread = suspendContext.getEventThread();
    suspendContext.setThread(thread);

    if (oldThread == null) {
      switch (suspendContext.getSuspendPolicy()) {
        case EventRequest.SUSPEND_ALL -> suspendContext.getVirtualMachine().addedSuspendAllContext();
        case EventRequest.SUSPEND_EVENT_THREAD -> Objects.requireNonNull(suspendContext.getEventThread()).threadWasSuspended();
      }
      //this is the first event in the eventSet that we process
      suspendContext.getDebugProcess().beforeSuspend(suspendContext);
    }
  }
private static void preprocessEvent(SuspendContextImpl suspendContext, ThreadReference thread)