更换mysql的驱动为8.0.22
List<Map<String, ?>> results = this.queryDatabaseChangeLogTable(database);
Iterator var5 = results.iterator();
while(var5.hasNext()) {
Map rs = (Map)var5.next();
String storedFileName = rs.get("FILENAME").toString();
String fileName = DatabaseChangeLog.normalizePath(storedFileName);
String author = rs.get("AUTHOR").toString();
String id = rs.get("ID").toString();
String md5sum = rs.get("MD5SUM") != null && this.databaseChecksumsCompatible ? rs.get("MD5SUM").toString() : null;
String description = rs.get("DESCRIPTION") == null ? null : rs.get("DESCRIPTION").toString();
String comments = rs.get("COMMENTS") == null ? null : rs.get("COMMENTS").toString();
Object tmpDateExecuted = rs.get("DATEEXECUTED");
Date dateExecuted = null;
if (tmpDateExecuted instanceof Date) {
dateExecuted = (Date)tmpDateExecuted;
} else {
SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
dateExecuted = df.parse((String)tmpDateExecuted);
} catch (ParseException var26) {
}
}
这个地方更换驱动版本后 DATEEXECUTED的类型会变为java.sql.Timestamp 就不会强转为String了