Fixed explicit cast exception while using oracle 10g

This commit is contained in:
didiez
2016-05-10 17:41:36 +02:00
committed by Michael Minella
parent df14546a7f
commit a55970fe77

View File

@@ -369,13 +369,18 @@ public class JdbcTaskExecutionDao implements TaskExecutionDao {
public TaskExecution mapRow(ResultSet rs, int rowNum) throws SQLException {
long id = rs.getLong("TASK_EXECUTION_ID");
return new TaskExecution(id,
(Integer) rs.getObject("EXIT_CODE"),
getNullableExitCode(rs),
rs.getString("TASK_NAME"),
rs.getTimestamp("START_TIME"),
rs.getTimestamp("END_TIME"),
rs.getString("EXIT_MESSAGE"),
getTaskParameters(id));
}
private Integer getNullableExitCode(ResultSet rs) throws SQLException {
int exitCode = rs.getInt("EXIT_CODE");
return !rs.wasNull() ? exitCode : null;
}
}
}