void () { int processed = 0; for (Event event : eventSet) { if (myReturnValueWatcher != null && myReturnValueWatcher.isTrackingEnabled()) { if (myReturnValueWatcher.processEvent(event)) { processed++; continue; } } Consumer<? super Event> handler = getEventRequestHandler(event); if (handler != null) { handler.accept(event); processed++; } } if (processed == eventSet.size()) { DebuggerUtilsAsync.resume(eventSet); return; } LocatableEvent locatableEvent = getLocatableEvent(eventSet); if (skipEvent(locatableEvent)) { return; } SuspendContextImpl suspendContext = null; if (isResumeOnlyCurrentThread() && locatableEvent != null) { for (SuspendContextImpl context : getSuspendManager().getEventContexts()) { ThreadReferenceProxyImpl threadProxy = getVirtualMachineProxy().getThreadReferenceProxy(locatableEvent.thread()); if (context.getSuspendPolicy() == EventRequest.SUSPEND_ALL && context.isExplicitlyResumed(threadProxy)) { context.myResumedThreads.remove(threadProxy); suspendContext = context; suspendContext.myVotesToVote = eventSet.size(); break; } } } if (suspendContext == null) { suspendContext = getSuspendManager().pushSuspendContext(eventSet); } Set<ClassPrepareRequestor> notifiedClassPrepareEventRequestors = null; ReferenceType lastPreparedClass = null; for (Event event : eventSet) { if (getEventRequestHandler(event) != null) { // handled before getSuspendManager().voteResume(suspendContext); continue; } //if (LOG.isDebugEnabled()) { // LOG.debug("EVENT : " + event); //} try { if (event instanceof VMStartEvent) { //Sun WTK fails when J2ME when event set is resumed on VMStartEvent processVMStartEvent(suspendContext, (VMStartEvent)event); } else if (event instanceof VMDeathEvent || event instanceof VMDisconnectEvent) { processVMDeathEvent(suspendContext, event); } else if (event instanceof ClassPrepareEvent) { if (notifiedClassPrepareEventRequestors == null) { notifiedClassPrepareEventRequestors = new HashSet<>(eventSet.size()); } ReferenceType type = ((ClassPrepareEvent)event).referenceType(); if (lastPreparedClass != null && !lastPreparedClass.equals(type)) { LOG.error("EventSet contains ClassPrepareEvents for: " + lastPreparedClass + " and " + type); } lastPreparedClass = type; processClassPrepareEvent(suspendContext, (ClassPrepareEvent)event, notifiedClassPrepareEventRequestors); } else if (event instanceof LocatableEvent) { preloadEventInfo(((LocatableEvent)event)); //AccessWatchpointEvent, BreakpointEvent, ExceptionEvent, MethodEntryEvent, MethodExitEvent, //ModificationWatchpointEvent, StepEvent, WatchpointEvent if (event instanceof StepEvent) { processStepEvent(suspendContext, (StepEvent)event); } else { processLocatableEvent(suspendContext, (LocatableEvent)event); } } else if (event instanceof ClassUnloadEvent) { processDefaultEvent(suspendContext); } } catch (VMDisconnectedException e) { LOG.debug(e); } catch (InternalException e) { LOG.info(e); } catch (Throwable e) { LOG.error(e); } } }