docs: protected OpenCmsCore upgradeRunlevel(ServletContext context) throws CmsInitException {
  
          synchronized (LOCK) {
              if ((m_instance != null) && (getRunLevel() >= OpenCms.RUNLEVEL_4_SERVLET_ACCESS)) {
                  // instance already in runlevel 5 or 6
                  return m_instance;
              }
              if (getRunLevel() != OpenCms.RUNLEVEL_1_CORE_OBJECT) {
                  CmsLog.INIT.error(
                      Messages.get().getBundle().key(
                          Messages.LOG_WRONG_INIT_SEQUENCE_2,
                          new Integer(4),
                          new Integer(getRunLevel())));
                  return m_instance;
              }
  
              // set the runlevel to "initializing OpenCms"
              setRunLevel(OpenCms.RUNLEVEL_2_INITIALIZING);
              // initialize the servlet context
              m_instance.initContext(context);
              // initialization successfully finished - OpenCms servlet is online
              // the runlevel will change from 2 directly to 4, this is on purpose
              setRunLevel(OpenCms.RUNLEVEL_4_SERVLET_ACCESS);
  
              afterUpgradeRunlevel();
  
              return m_instance;
          }
      }