Support null startTime and EndTime for Db2 Task Execution Create

resolves #948
This commit is contained in:
Glenn Renfro
2024-06-03 11:00:21 -04:00
parent 5c84bd56b9
commit 704bd5eb19

View File

@@ -617,8 +617,26 @@ public class JdbcTaskExecutionDao implements TaskExecutionDao {
if (rs.wasNull()) {
parentExecutionId = null;
}
return new TaskExecution(id, getNullableExitCode(rs), rs.getString("TASK_NAME"),
rs.getObject("START_TIME", LocalDateTime.class), rs.getObject("END_TIME", LocalDateTime.class),
LocalDateTime startTime = null;
LocalDateTime endTime = null;
try {
startTime = rs.getObject("START_TIME", LocalDateTime.class);
}
catch (NullPointerException npe) {
if (!npe.getMessage().contains("<local4>")) {
throw npe;
}
}
try {
endTime = rs.getObject("END_TIME", LocalDateTime.class);
}
catch (NullPointerException npe) {
if (!npe.getMessage().contains("<local4>")) {
throw npe;
}
}
return new TaskExecution(id, getNullableExitCode(rs), rs.getString("TASK_NAME"), startTime, endTime,
rs.getString("EXIT_MESSAGE"), getTaskArguments(id), rs.getString("ERROR_MESSAGE"),
rs.getString("EXTERNAL_EXECUTION_ID"), parentExecutionId);
}