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

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      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>
      

            Assignee:
            Stephen Connolly
            Reporter:
            Stephen Connolly
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: