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

InfluxDB plugin throws java.lang.StringIndexOutOfBoundsException if Sonar project name contains /

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Blocker Blocker
    • influxdb-plugin
    • None
    • Jenkins 2.89.4
      InfluxDB plugin 1.14

      Parsing of the Jenkins log fails if a Sonar project name contains a slash. The method getSonarProjectName just takes everything after the last slash, so it returns an incorrect project name to setSonarDetails.

       

      java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      	at java.lang.String.substring(String.java:1967)
      	at jenkinsci.plugins.influxdb.generators.SonarQubePointGenerator.setSonarDetails(SonarQubePointGenerator.java:79)
      	at jenkinsci.plugins.influxdb.generators.SonarQubePointGenerator.hasReport(SonarQubePointGenerator.java:66)
      	at jenkinsci.plugins.influxdb.InfluxDbPublisher.perform(InfluxDbPublisher.java:273)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
      	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1$1.call(SynchronousNonBlockingStepExecution.java:49)
      	at hudson.security.ACL.impersonate(ACL.java:260)
      	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution$1.run(SynchronousNonBlockingStepExecution.java:46)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)

       

            aleksisimell Aleksi Simell
            jl68 Jonas Lindström
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: