BATCH-1059: use milliseconds in date job parameter toString()
This commit is contained in:
@@ -108,7 +108,7 @@ public class JobParameter implements Serializable{
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return parameter.toString();
|
||||
return parameterType==ParameterType.DATE ? ""+((Date)parameter).getTime() : parameter.toString();
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
|
||||
@@ -42,6 +42,13 @@ public class JobParameterTests {
|
||||
assertEquals(new Date(0L), jobParameter.getValue());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDateParameterToString(){
|
||||
Date epoch = new Date(0L);
|
||||
jobParameter = new JobParameter(epoch);
|
||||
assertEquals("0", jobParameter.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testEquals(){
|
||||
jobParameter = new JobParameter("test");
|
||||
|
||||
Reference in New Issue
Block a user