Compare commits

...

1 Commits

Author SHA1 Message Date
AlixMetivier
82b92d8235 fix(TBD-10269): force return in case of bad job design (#3287) 2020-07-22 10:04:57 +02:00

View File

@@ -58,11 +58,22 @@ public class JDBCUtil {
}
public static Date getDate(ResultSet rs, int index) throws java.sql.SQLException {
if(rs.getTimestamp(index) != null) {
return new Date(rs.getTimestamp(index).getTime());
Date result = null;
try {
if(rs.getTimestamp(index) != null) {
result = new Date(rs.getTimestamp(index).getTime());
return result;
}
} catch (java.sql.SQLException e) {
}
return null;
try {
if(rs.getDate(index) != null) {
result = new Date(rs.getDate(index).getTime());
return result;
}
} catch (java.sql.SQLException e) {
}
return result;
}
//decrease the get method call number