
| Key: |
BATCH-669
|
| Type: |
Improvement
|
| Status: |
Open
|
| Priority: |
Minor
|
| Assignee: |
Unassigned
|
| Reporter: |
Leon Noordermeer
|
| Votes: |
0
|
| Watchers: |
1
|
|
If you were logged in you would be able to see more operations.
|
|
|
Spring Batch
Created: 18/Jun/08 06:29 AM
Updated: 18/Jun/08 01:14 PM
|
|
| Component/s: |
Core
|
| Affects Version/s: |
1.1.0,
1.0.1,
1.0.0
|
| Fix Version/s: |
None
|
|
|
Environment:
|
any (windows / aix) on Oracle 10g
|
|
|
It is unclear to me why JdbcJobInstanceDao inserts 0L values into the JOB_PARAMS table instead of NULL. This results, in example of a String parameter type, to the value 01 Jan 1970 in the column JOB_PARAMS.DATE_VAL, while it should be NULL. In my opinion the absence of an object is something different then a value of 0L.
The same goes voor the columns STRING_VAL, LONG_VAL, DOUBLE_VAL.
Example:
Actual code, line 142-144 of JdbcJobInstanceDao:
if (type == ParameterType.STRING) {
args = new Object[] { jobId, key, type, value, new Timestamp(0L), new Long(0), new Double(0) };
}
Fix:
if (type == ParameterType.STRING) {
args = new Object[] { jobId, key, type, value, null, null, null };
}
Mind that the schema allows null values.
|
|
Description
|
It is unclear to me why JdbcJobInstanceDao inserts 0L values into the JOB_PARAMS table instead of NULL. This results, in example of a String parameter type, to the value 01 Jan 1970 in the column JOB_PARAMS.DATE_VAL, while it should be NULL. In my opinion the absence of an object is something different then a value of 0L.
The same goes voor the columns STRING_VAL, LONG_VAL, DOUBLE_VAL.
Example:
Actual code, line 142-144 of JdbcJobInstanceDao:
if (type == ParameterType.STRING) {
args = new Object[] { jobId, key, type, value, new Timestamp(0L), new Long(0), new Double(0) };
}
Fix:
if (type == ParameterType.STRING) {
args = new Object[] { jobId, key, type, value, null, null, null };
}
Mind that the schema allows null values. |
Show » |
|