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

NPE when binding JSON form data without 'properties' field

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Similar Issues:

      Description

      When the "properties" element isn't specified in the JSON form blob the Job processing logic hits a NPE.

      This could happen if a Custom project type uses a form that overrides Job's configure.jelly, or if another tool is used to produce the JSON message.

      FWIW, I manipulated the JSON message to drop every other field without a problem processing the forms for FreeStyleProject and MatrixProject, "properties" was the only one I couldn't remove and have it do the right thing.

      I have a PR to fix this here: https://jenkins.ci.cloudbees.com/job/core/job/jenkins-core/891/

        Attachments

          Activity

          Hide
          mattmoor Matthew Moore added a comment -

          Been fixed for a while.

          Show
          mattmoor Matthew Moore added a comment - Been fixed for a while.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Oleg Nenashev
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/0b260dad8c26268f3fc01e1d6016712053645130
          Log:
          Noting #1296 an #1280 (FIXED JENKINS-23437)

          Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: changelog.html http://jenkins-ci.org/commit/jenkins/0b260dad8c26268f3fc01e1d6016712053645130 Log: Noting #1296 an #1280 (FIXED JENKINS-23437 ) Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          BTW, the bug fix in https://github.com/jenkinsci/jenkins/pull/1280 seems to be valid.

          Show
          oleg_nenashev Oleg Nenashev added a comment - BTW, the bug fix in https://github.com/jenkinsci/jenkins/pull/1280 seems to be valid.
          Hide
          danielbeck Daniel Beck added a comment -

          or if another tool is used to produce the JSON message.

          JSON forms are not public API.

          Show
          danielbeck Daniel Beck added a comment - or if another tool is used to produce the JSON message. JSON forms are not public API.

            People

            Assignee:
            mattmoor Matthew Moore
            Reporter:
            mattmoor Matthew Moore
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: