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

Replace NPE stacktrace with message when Gerrit change number and patchset numer are not set

    XMLWordPrintable

Details

    Description

      If Gerrit change number and patchset numer are not set build will be failed with NPE exception. (Example: if build is not triggered by Gerrit but started manually by button "Build now")
      Replace it with corresponding messages

       java.lang.NumberFormatException: null
      at java.lang.Integer.parseInt(Integer.java:542)
      at java.lang.Integer.parseInt(Integer.java:615)
      at org.jenkinsci.plugins.sonargerrit.SonarToGerritPublisher.perform(SonarToGerritPublisher.java:237)
      at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
      at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1037)
      at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
      at hudson.model.Run.execute(Run.java:1763)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:410)

      Attachments

        Activity

          People

            aquarellian Tatiana Didik
            aquarellian Tatiana Didik
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: