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

XStream form of projects excessively strict about null fields

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • core

      You might expect that you could create a freestyle project as config.xml simply by writing <project/> and allowing all fields to be set to default values. Unfortunately you then get a NullPointerException from various places, such as Project.createTransientActions, which expect fields such as builders to have been set to non-null collections (as the constructor does).

      This is annoying when trying to create jobs directly from XML, e.g. when using a templating system. Better to make fields default to the constructor’s value.

          [JENKINS-15817] XStream form of projects excessively strict about null fields

          Code changed in jenkins
          User: Jesse Glick
          Path:
          changelog.html
          core/src/main/java/hudson/model/AbstractProject.java
          core/src/main/java/hudson/model/Project.java
          test/src/test/java/hudson/model/FreeStyleProjectTest.java
          http://jenkins-ci.org/commit/jenkins/7d2c0efa7bad8f2a0a47f7dcc395a5a4baee99cd
          Log:
          [FIXED JENKINS-15817] XStream form of projects excessively strict about null fields.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: changelog.html core/src/main/java/hudson/model/AbstractProject.java core/src/main/java/hudson/model/Project.java test/src/test/java/hudson/model/FreeStyleProjectTest.java http://jenkins-ci.org/commit/jenkins/7d2c0efa7bad8f2a0a47f7dcc395a5a4baee99cd Log: [FIXED JENKINS-15817] XStream form of projects excessively strict about null fields.

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2070
          [FIXED JENKINS-15817] XStream form of projects excessively strict about null fields. (Revision 7d2c0efa7bad8f2a0a47f7dcc395a5a4baee99cd)

          Result = UNSTABLE
          Jesse Glick : 7d2c0efa7bad8f2a0a47f7dcc395a5a4baee99cd
          Files :

          • core/src/main/java/hudson/model/Project.java
          • test/src/test/java/hudson/model/FreeStyleProjectTest.java
          • core/src/main/java/hudson/model/AbstractProject.java
          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #2070 [FIXED JENKINS-15817] XStream form of projects excessively strict about null fields. (Revision 7d2c0efa7bad8f2a0a47f7dcc395a5a4baee99cd) Result = UNSTABLE Jesse Glick : 7d2c0efa7bad8f2a0a47f7dcc395a5a4baee99cd Files : core/src/main/java/hudson/model/Project.java test/src/test/java/hudson/model/FreeStyleProjectTest.java core/src/main/java/hudson/model/AbstractProject.java changelog.html

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: