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

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

    XMLWordPrintable

    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

            stephenconnolly Stephen Connolly created issue -
            scm_issue_link SCM/JIRA link daemon made changes -
            Field Original Value New Value
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]
            recampbell Ryan Campbell made changes -
            Issue Type New Feature [ 2 ] Bug [ 1 ]
            recampbell Ryan Campbell made changes -
            Epic Link JENKINS-41234 [ 177999 ]
            stephenconnolly Stephen Connolly made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            cloudbees CloudBees Inc. made changes -
            Remote Link This issue links to "CloudBees Internal OSS-1884 (Web Link)" [ 18526 ]

              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: