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

NPE during loading of branch jobs when migrating from 1.x to 2.x

    Details

    • Similar Issues:

      Description

      There is an NPE in the readResolve() that gets squashed by the RobustReflectionConverter leading to a partially valid object.

      This partially valid object can then have unintended consequences. Better is to make the getter methods defensive about the potential null rather than relying on readResolve() to fix.

      Here is one piece of sample data that generates the NPE

          <org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty plugin="workflow-multibranch@2.10-SNAPSHOT">
            <branch class="jenkins.branch.Branch$Dead" plugin="branch-api@1.12-SNAPSHOT">
              <sourceId>::NullSCMSource::</sourceId>
              <head class="org.jenkinsci.plugins.github_branch_source.BranchSCMHead" plugin="github-branch-source@1.11-SNAPSHOT">
                <name>quicker</name>
              </head>
              <scm class="hudson.scm.NullSCM"/>
              <properties class="java.util.concurrent.CopyOnWriteArrayList">
                <jenkins.branch.NoTriggerBranchProperty/>
              </properties>
            </branch>
          </org.jenkinsci.plugins.workflow.multibranch.BranchJobProperty>
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stephenconnolly Stephen Connolly
                Reporter:
                stephenconnolly Stephen Connolly
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: