StringIndexOutOfBoundsException: String index out of range: -35

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Blocker
    • None
    • Environment:
      jenkins deployed on tomcat as ROOT context

      m_path = request.getContextPath() + request.getPathInfo();

      getContextPath never return null (according to javadoc) and return "" for ROOT context. On tomcat, getPathInfo return null and getServletPath should be used (see https://mail-archives.apache.org/mod_mbox/tomcat-users/200103.mbox/%3C20010305171525.13786.qmail@web4901.mail.yahoo.com%3E for explanation)

      this result in "" + null = "null" (by Java spec, arguably stupid)
      then trying to substract root path fails.

            Assignee:
            Nicolas De Loof
            Reporter:
            Nicolas De Loof
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: