docs: private void afterUpgradeRunlevel() {
  
          try {
              // read the persistent locks
              m_instance.m_securityManager.readLocks();
          } catch (CmsException e) {
              if (LOG.isErrorEnabled()) {
                  LOG.error(
                      org.opencms.lock.Messages.get().getBundle().key(org.opencms.lock.Messages.ERR_READ_LOCKS_0),
                      e);
              }
          }
  
          if (OpenCms.getRunLevel() == OpenCms.RUNLEVEL_4_SERVLET_ACCESS) {
              // only init ADE manager in case of servlet initialization, it won't be needed in case of shell access
              CmsThreadStatsTreeProfilingHandler stats = new CmsThreadStatsTreeProfilingHandler();
              try {
                  CmsDefaultProfilingHandler.INSTANCE.addHandler(stats);
                  m_adeManager.initialize();
              } finally {
                  CmsDefaultProfilingHandler.INSTANCE.removeHandler(stats);
                  if (stats.hasData()) {
                      String adeInitData = stats.dump();
                      String prefix = String.format("%010X", Long.valueOf(System.currentTimeMillis() / 1000));
                      String path = OpenCms.getSystemInfo().getAbsoluteRfsPathRelativeToWebInf(
                          "logs/" + prefix + "_startup-ade-driver-report.xml");
                      try (FileOutputStream out = new FileOutputStream(path)) {
                          out.write(adeInitData.getBytes("UTF-8"));
                      } catch (Exception e) {
                          LOG.error(
                              "Could not write ADE init profiling data to file, writing to log instead: "
                                  + e.getLocalizedMessage(),
                              e);
                          LOG.error(adeInitData);
                      }
                  }
              }
  
              try {
                  // get an Admin cms context object with site root set to "/"
                  CmsObject adminCms = initCmsObject(
                      null,
                      null,
                      getDefaultUsers().getUserAdmin(),
                      (String)null,
                      (String)null);
                  OpenCms.getSearchManager().initSpellcheckIndex(adminCms);
              } catch (CmsException e) {
                  throw new CmsInitException(Messages.get().container(Messages.ERR_CRITICAL_INIT_ADMINCMS_0), e);
              }
  
          }
          // everything is initialized, now start publishing
          m_publishManager.startPublishing();
      }