protected void resume() {
    assertNotResumed();
    DebuggerManagerThreadImpl.assertIsManagerThread();
    try {
      if (!Patches.IBM_JDK_DISABLE_COLLECTION_BUG) {
        for (ObjectReference objectReference : myKeptReferences) {
          DebuggerUtilsEx.enableCollection(objectReference);
        }
        myKeptReferences.clear();
      }

      for (SuspendContextCommandImpl cmd = pollPostponedCommand();
          cmd != null;
          cmd = pollPostponedCommand()) {
        cmd.notifyCancelled();
      }

      resumeImpl();
    } finally {
      myIsResumed = true;
    }
  }