docs: private SerializationPolicy getSerializationPolicy(CmsObject cms) {
  
          boolean online = cms.getRequestContext().getCurrentProject().isOnlineProject();
          if (online && (m_serPolicyOnline != null)) {
              return m_serPolicyOnline;
          } else if (!online && (m_serPolicyOffline != null)) {
              return m_serPolicyOffline;
          }
  
          SerializationPolicy serializationPolicy = null;
  
          // Open the RPC resource file and read its contents
          InputStream is = null;
          try {
              // check if this is a static resource request
              if (m_serializationPolicyPath.startsWith(OpenCms.getSystemInfo().getStaticResourceContext())) {
                  URL resourceURL = CmsStaticResourceHandler.getStaticResourceURL(m_serializationPolicyPath);
                  URLConnection connection;
                  connection = resourceURL.openConnection();
                  is = connection.getInputStream();
              } else {
                  // try reading from the RFS
                  String rfsPath = m_serializationPolicyPath;
                  if (rfsPath.startsWith(OpenCms.getSystemInfo().getContextPath())) {
                      rfsPath = rfsPath.substring(OpenCms.getSystemInfo().getContextPath().length());
                  }
                  rfsPath = CmsStringUtil.joinPaths(OpenCms.getSystemInfo().getWebApplicationRfsPath(), rfsPath);
                  File policyFile = new File(rfsPath);
                  if (policyFile.exists() && policyFile.canRead()) {
                      is = new FileInputStream(policyFile);
                  } else {
                      // the file does not exist in the RFS, try the VFS
                      String policyPath = OpenCms.getLinkManager().getRootPath(cms, m_serializationPolicyPath);
                      is = new ByteArrayInputStream(cms.readFile(policyPath).getContents());
                  }
              }
          } catch (Exception ex) {
              // most likely file not found
              String message = "ERROR: The serialization policy file '"
                  + m_serializationPolicyPath
                  + "' was not found; did you forget to include it in this deployment?";
              LOG.warn(message);
              LOG.warn(ex.getLocalizedMessage(), ex);
  
          }
          if (is == null) {
              return new CmsDummySerializationPolicy();
          }
  
          // read the policy
          try {
              serializationPolicy = SerializationPolicyLoader.loadFromStream(is, null);
          } catch (ParseException e) {
              LOG.error("ERROR: Failed to parse the policy file '" + m_serializationPolicyPath + "'", e);
          } catch (IOException e) {
              LOG.error("ERROR: Could not read the policy file '" + m_serializationPolicyPath + "'", e);
          } finally {
              try {
                  is.close();
              } catch (@SuppressWarnings("unused") IOException e) {
                  // Ignore this error
              }
          }
  
          if (online) {
              m_serPolicyOnline = serializationPolicy;
          } else {
              m_serPolicyOffline = serializationPolicy;
          }
          return serializationPolicy;
      }