Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-8142

StringIndexOutOfBoundsException when checks "Validate repository URLs up to the first variable name"

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: subversion-plugin
    • Labels:
      None
    • Environment:
      SUbversion Plugin 1.21
    • Similar Issues:

      Description

      I checked ""Validate repository URLs up to the first variable name" on global settings. and then I got he following Exception.

      javax.servlet.ServletException: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:597)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:640)
      org.kohsuke.stapler.MetaClass$7.doDispatch(MetaClass.java:242)
      org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:562)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:640)
      org.kohsuke.stapler.MetaClass$7.doDispatch(MetaClass.java:242)
      org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:562)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:640)
      org.kohsuke.stapler.Stapler.invoke(Stapler.java:478)
      org.kohsuke.stapler.Stapler.service(Stapler.java:160)
      javax.servlet.http.HttpServlet.service(Unknown Source)
      hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
      net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:151)
      net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:129)
      net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:69)
      org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:46)
      hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
      hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
      hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
      hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
      hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
      hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)

      原因

      java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      java.lang.String.substring(String.java:1937)
      hudson.scm.SubversionSCM$DescriptorImpl.doCheckRemote(SubversionSCM.java:1813)
      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in hudson
          User: : sogabe
          Path:
          trunk/hudson/plugins/subversion/pom.xml
          trunk/hudson/plugins/subversion/src/main/java/hudson/scm/SubversionSCM.java
          http://jenkins-ci.org/commit/37075
          Log:
          [FIXED JENKINS-8142] Fixed STringOutOfBoundExcepion when "Validate repository URLs up to the first variable name" is checked.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : sogabe Path: trunk/hudson/plugins/subversion/pom.xml trunk/hudson/plugins/subversion/src/main/java/hudson/scm/SubversionSCM.java http://jenkins-ci.org/commit/37075 Log: [FIXED JENKINS-8142] Fixed STringOutOfBoundExcepion when "Validate repository URLs up to the first variable name" is checked.

            People

            • Assignee:
              sogabe sogabe
              Reporter:
              sogabe sogabe
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: