I have created Freestyle project and used 'This project is parameterized'. I created a String parameter named SHELVED_CHANGELIST_NUMBER, and checked 'Trim the string'.
I have a 'Perforce: Unshelve' build step with the following:
Unshelve changelist: ${SHELVED_CHANGELIST_NUMBER}
When I try to build using 'Build with Paramters', I input 227458 as the changelist number.
I then get this error:
ERROR: Build step failed with exception
java.lang.NumberFormatException: For input string: " 227458"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Long.parseLong(Long.java:578)
at java.lang.Long.parseLong(Long.java:631)
at org.jenkinsci.plugins.p4.unshelve.UnshelveBuilder.unshelve(UnshelveBuilder.java:119)
at org.jenkinsci.plugins.p4.unshelve.UnshelveBuilder.perform(UnshelveBuilder.java:86)
at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:744)
at hudson.model.Build$BuildExecution.build(Build.java:206)
at hudson.model.Build$BuildExecution.doRun(Build.java:163)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
at hudson.model.Run.execute(Run.java:1815)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Build step 'Perforce: Unshelve' marked build as failure