code: public void popDiagnosticHandler(DiagnosticHandler h) {
          Assert.check(diagnosticHandler == h);
          diagnosticHandler = h.prev;
      }
docs: Replace the specified diagnostic handler with the
  handler that was current at the time this handler was created.
  The given handler must be the currently installed handler;
  it must be specified explicitly for clarity and consistency checking.