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

Instance doesn't start because of a NPE

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Build-pipeline is generating a "Null Pointer Exception" because params.getParameterDefinitionNames() is not checked if it is null in the class BuildForm.java

      if (params != null) {
          for (String p : params.getParameterDefinitionNames()) {
              paramList.add(p);
          }
      }
      

      As consequence, the following stack trace is launched and the instance of jenkins goes down

      Caused by: java.lang.NullPointerException\
          at hudson.model.ParametersDefinitionProperty$1.size(ParametersDefinitionProperty.java:105)\
          at java.util.AbstractList$Itr.hasNext(AbstractList.java:351)\
          at au.com.centrumsystems.hudson.plugin.buildpipeline.BuildForm.<init>(BuildForm.java:102)\
          at au.com.centrumsystems.hudson.plugin.buildpipeline.BuildForm.<init>(BuildForm.java:93)\
          at au.com.centrumsystems.hudson.plugin.buildpipeline.BuildForm.<init>(BuildForm.java:93)\
          at au.com.centrumsystems.hudson.plugin.buildpipeline.BuildForm.<init>(BuildForm.java:74)\
      

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Manuel Recena
            Path:
            src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildForm.java
            http://jenkins-ci.org/commit/build-pipeline-plugin/1dbe68a2a15d037117415f37c5e856c103b005aa
            Log:
            Merge pull request #98 from carlosrodlop/JENKINS-34370

            JENKINS-34370 NPE coming from BuildForm.java in line 102

            Compare: https://github.com/jenkinsci/build-pipeline-plugin/compare/93872cb0edf9...1dbe68a2a15d

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Manuel Recena Path: src/main/java/au/com/centrumsystems/hudson/plugin/buildpipeline/BuildForm.java http://jenkins-ci.org/commit/build-pipeline-plugin/1dbe68a2a15d037117415f37c5e856c103b005aa Log: Merge pull request #98 from carlosrodlop/ JENKINS-34370 JENKINS-34370 NPE coming from BuildForm.java in line 102 Compare: https://github.com/jenkinsci/build-pipeline-plugin/compare/93872cb0edf9...1dbe68a2a15d
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Felix Belzunce Arcos
            Path:
            core/src/main/java/hudson/model/ParametersDefinitionProperty.java
            http://jenkins-ci.org/commit/jenkins/9b18d9bd5d58cc1c735303ac05eb2b653dffe44a
            Log:
            [FIXED JENKINS-34370] Fix NPE getting size of parameterDefinitions.size (#2296)

            • Fix NPE getting size of parameterDefinitions.size
            • Protect get against NPE
            • readResolve and adequate List management
            • Address comments
            • Address comments
            • Use NullPointerException
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Felix Belzunce Arcos Path: core/src/main/java/hudson/model/ParametersDefinitionProperty.java http://jenkins-ci.org/commit/jenkins/9b18d9bd5d58cc1c735303ac05eb2b653dffe44a Log: [FIXED JENKINS-34370]  Fix NPE getting size of parameterDefinitions.size (#2296) Fix NPE getting size of parameterDefinitions.size Protect get against NPE readResolve and adequate List management JENKINS-34370 Simplify code Address comments Address comments Use NullPointerException
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            Released as Jenkins-2.4

            Show
            oleg_nenashev Oleg Nenashev added a comment - Released as Jenkins-2.4

              People

              • Assignee:
                carlosrodlop Carlos Lopez
                Reporter:
                carlosrodlop Carlos Lopez
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: