-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
Bug description
In SpringBatch 1.x~4.x , JobParameter supports null value , so save in database will be null. While java.sql.ResultSet#getLong
or java.sql.ResultSet#getDouble
return primitive type, a round trip from database will finally get 0 or 0.0. It work uncorrectly in jobOperator.restart
.
That may cause:
jobOperator.restart
will create new JobInstance, not act like restart.- If null is meaningful in user project, that could cause the different result, because it restart an JobParameter with 0 or 0.0 value, not null anymore.
Environment
Spring Batch version: 1.x ~ 4.x, using JdbcJobExecutionDao
(JobParameter unsupported null value in 5.x )
Steps to reproduce
- Creating an JobParameter with null value that in
java.lang.Long
orjava.lang.Double
type. - Creating an job will failed in process.
- Using
jobOperator.restart
to restart that JobInstance. - Check the count of JobInstance
Expected behavior
The jobOperator.restart
should work right.