Skip to content

Commit

Permalink
Support null startTime and EndTime for Db2 Task Execution Create
Browse files Browse the repository at this point in the history
 resolves #948
  • Loading branch information
cppwfs committed Jun 3, 2024
1 parent 5c84bd5 commit 704bd5e
Showing 1 changed file with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,26 @@ public TaskExecution mapRow(ResultSet rs, int rowNum) throws SQLException {
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);
}
Expand Down

0 comments on commit 704bd5e

Please sign in to comment.