mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-23 09:31:32 +01:00
test code to run on cloudbees to debug a build issue
Former-commit-id: b3bba62d28666160682ea15813ea80411f72f9a0
This commit is contained in:
@@ -296,6 +296,9 @@ public final class ConnectionFactory {
|
|||||||
try {
|
try {
|
||||||
updateFile = String.format(DB_STRUCTURE_UPDATE_RESOURCE, schema);
|
updateFile = String.format(DB_STRUCTURE_UPDATE_RESOURCE, schema);
|
||||||
is = ConnectionFactory.class.getClassLoader().getResourceAsStream(updateFile);
|
is = ConnectionFactory.class.getClassLoader().getResourceAsStream(updateFile);
|
||||||
|
if (is == null) {
|
||||||
|
throw new DatabaseException(String.format("Unable to load update file '%s'", updateFile));
|
||||||
|
}
|
||||||
reader = new InputStreamReader(is, "UTF-8");
|
reader = new InputStreamReader(is, "UTF-8");
|
||||||
in = new BufferedReader(reader);
|
in = new BufferedReader(reader);
|
||||||
final StringBuilder sb = new StringBuilder(2110);
|
final StringBuilder sb = new StringBuilder(2110);
|
||||||
@@ -342,7 +345,9 @@ public final class ConnectionFactory {
|
|||||||
rs = cs.executeQuery();
|
rs = cs.executeQuery();
|
||||||
if (rs.next()) {
|
if (rs.next()) {
|
||||||
if (!DB_SCHEMA_VERSION.equals(rs.getString(1))) {
|
if (!DB_SCHEMA_VERSION.equals(rs.getString(1))) {
|
||||||
LOGGER.debug("Updating from version: " + rs.getString(1));
|
LOGGER.error("Current Schema: " + DB_SCHEMA_VERSION);
|
||||||
|
LOGGER.error("DB Schema: " + rs.getString(1));
|
||||||
|
LOGGER.error("-------------------------------------------------------\n\n\n\n\nUpdating from version: " + rs.getString(1) + "\n\n\n\n\n---------------------------------------------------------------------------------");
|
||||||
updateSchema(conn, rs.getString(1));
|
updateSchema(conn, rs.getString(1));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user