docs: public String encodeURL(HttpSession sess, HttpServletRequest req, String url)
    {
      if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE))
      {
        String traceUrl = url; // PK11017
        if ((SessionManagerConfig.isHideSessionValues()) && (traceUrl != null))
        {
          int x = traceUrl.indexOf("?");
          if (x != -1)
          {
            traceUrl = traceUrl.substring(0, x);
          }
        }
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE))
        {
          LoggingUtil.SESSION_LOGGER_CORE.entering(methodClassName, methodNames[ENCODE_URL], traceUrl);
        }
      }
      if (sess == null)
      {
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE))
        {
          LoggingUtil.SESSION_LOGGER_CORE.exiting(methodClassName, methodNames[ENCODE_URL], null);
        }
        return null;
      }
  
      if (req==null) { //this is coming from the SIP request - use the session object
          url=((SessionAffinityManager)_sam).encodeURL(sess, url);
      } else {
          SessionAffinityContext sac = getSessionAffinityContext(req);
          if (shouldEncodeURL(url, req))
          {
              if (_smc.isDebugSessionCrossover() && crossoverCheck(req, sess))
              {
                  Object parms[] = new Object[] { getAppName(), sess.getId(), getCurrentSessionId() };
                  // Needed to create a LogRecord so we could have parameters and a
                  // throwable in the same log
                  LoggingUtil.logParamsAndException(LoggingUtil.SESSION_LOGGER_CORE, Level.SEVERE, methodClassName, methodNames[ENCODE_URL], "SessionContext.CrossoverOnReturn", parms,
                                                    new SessionCrossoverStackTrace());
              }
              else
              {
                  url = _sam.encodeURL(req, url, sac);
              }
          }
      }
  
      if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE))
      {
        String traceUrl = url; // PK11017
        if ((SessionManagerConfig.isHideSessionValues()) && (traceUrl != null))
        {
          int x = traceUrl.indexOf("?");
          if (x != -1)
          {
            traceUrl = traceUrl.substring(0, x);
          }
        }
        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && LoggingUtil.SESSION_LOGGER_CORE.isLoggable(Level.FINE))
        {
          LoggingUtil.SESSION_LOGGER_CORE.exiting(methodClassName, methodNames[ENCODE_URL], "new url is " + traceUrl);
        }
      }
      return url;
    }