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

NPE when requesting http://server/job/TEST-START/description and the description is empty

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      jenkins v1.409.1
      linux
    • Similar Issues:

      Description

      I just checked out the API page http://server/job/TEST-START/api/?, and clicked on the link in the Similarly, this URL can be used to get and set just the job description. POST form data with a "description" parameter to set the description. section, ie http://server/job/TEST-START/description. As the description is empty (newly created project), i would expect an empty page and not a NPE.

      This is the NullPointerException I got:

      <html><head><title>Error 500</title></head><body bgcolor="#ffffff"><h1>Status Code: 500</h1>Exception: <br>Stacktrace: <pre>java.lang.NullPointerException
      	at java.io.PrintWriter.write(PrintWriter.java:429)
      	at hudson.model.Job.doDescription(Job.java:1011)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:282)
      	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
      	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
      	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:103)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
      	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:233)
      	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
      	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
      	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
      	at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
      	at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
      	at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
      	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
      	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
      	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
      	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
      	at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
      	at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
      	at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
      	at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
      	at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
      	at java.lang.Thread.run(Thread.java:662)
      </pre><br><hr size="1" width="90%"><i>Generated by Winstone Servlet Engine v0.9.10 at Fri Jul 01 07:33:51 CEST 2011</i></body></html>
      

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          core/src/main/java/hudson/model/Job.java
          test/src/test/java/hudson/model/JobTest.java
          http://jenkins-ci.org/commit/jenkins/4c580ebdfeb7677687ff0735162349f661abc22e
          Log:
          Merge pull request #191 from redsolo/master

          [FIXED JENKINS-10182] - Fixed NPE for Job.doDescription() when description is NULL.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: core/src/main/java/hudson/model/Job.java test/src/test/java/hudson/model/JobTest.java http://jenkins-ci.org/commit/jenkins/4c580ebdfeb7677687ff0735162349f661abc22e Log: Merge pull request #191 from redsolo/master [FIXED JENKINS-10182] - Fixed NPE for Job.doDescription() when description is NULL.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/a7324c9ff342787291a9098135cd73392bd14eca
          Log:
          changelog for JENKINS-10182

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: changelog.html http://jenkins-ci.org/commit/jenkins/a7324c9ff342787291a9098135cd73392bd14eca Log: changelog for JENKINS-10182
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Erik Ramfelt
          Path:
          core/src/main/java/hudson/model/Job.java
          test/src/test/java/hudson/model/JobTest.java
          http://jenkins-ci.org/commit/jenkins/ad413c55e3e787aa9c2424d7232864c7b95ee86b
          Log:
          [FIXED JENKINS-10182] Used Util.fixNull() to handle the case when a jobs description is null

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Erik Ramfelt Path: core/src/main/java/hudson/model/Job.java test/src/test/java/hudson/model/JobTest.java http://jenkins-ci.org/commit/jenkins/ad413c55e3e787aa9c2424d7232864c7b95ee86b Log: [FIXED JENKINS-10182] Used Util.fixNull() to handle the case when a jobs description is null
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          core/src/main/java/hudson/model/Job.java
          test/src/test/java/hudson/model/JobTest.java
          http://jenkins-ci.org/commit/jenkins/4c580ebdfeb7677687ff0735162349f661abc22e
          Log:
          Merge pull request #191 from redsolo/master

          [FIXED JENKINS-10182] - Fixed NPE for Job.doDescription() when description is NULL.

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: core/src/main/java/hudson/model/Job.java test/src/test/java/hudson/model/JobTest.java http://jenkins-ci.org/commit/jenkins/4c580ebdfeb7677687ff0735162349f661abc22e Log: Merge pull request #191 from redsolo/master [FIXED JENKINS-10182] - Fixed NPE for Job.doDescription() when description is NULL.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Olivier Lamy
          Path:
          changelog.html
          http://jenkins-ci.org/commit/jenkins/a7324c9ff342787291a9098135cd73392bd14eca
          Log:
          changelog for JENKINS-10182

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Olivier Lamy Path: changelog.html http://jenkins-ci.org/commit/jenkins/a7324c9ff342787291a9098135cd73392bd14eca Log: changelog for JENKINS-10182

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            redsolo redsolo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: