code: private synchronized void ungetLogService() {
          doWarnIfClosed = doDebug();
          if (log != null) {
              bc.ungetService(logSR);
              logSR = null;
              log = null;
          }
      }
docs: * Unget the log service. Note that this method is synchronized on * the
  same object as the internal method that calls the actual log * service.
  This ensures that the log service is not removed by * this method while a
  log message is generated.