-
Bug
-
Resolution: Unresolved
-
Minor
-
None
Steps to reproduce
- Create a freestyle job
- Configure it to have a file parameter
- Go to /job/…/build?delay=100sec (add to delay), specify a file and click Build Now
- Wait a few seconds to persist the queue (just in case)
- Restart Jenkins
- Wait until the build is started
Expected results
The build starts and successfully picks up the file parameter, behaving as if there was no restart while the build was queued
Actual results
The build fails with:
Running as SYSTEM Building in workspace /var/jenkins_home/workspace/fs FATAL: Cannot invoke "org.apache.commons.fileupload.FileItem.getName()" because "this.this$0.file" is null java.lang.NullPointerException: Cannot invoke "org.apache.commons.fileupload.FileItem.getName()" because "this.this$0.file" is null at hudson.model.FileParameterValue$1.setUp(FileParameterValue.java:159) at hudson.model.Build$BuildExecution.doRun(Build.java:158) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:526) at hudson.model.Run.execute(Run.java:1894) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44) at hudson.model.ResourceController.execute(ResourceController.java:101) at hudson.model.Executor.run(Executor.java:442) Finished: FAILURE
Notes
May be a regression in 1.494 due to https://github.com/jenkinsci/jenkins/commit/4dde24e62037439b7b73addd7cefae83a254eb3c according to https://github.com/jenkinsci/jenkins/pull/9260#issue-2290484228
Compare https://github.com/jenkinsci/file-parameters-plugin/pull/190