mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-17 23:04:07 +01:00
Merge remote-tracking branch 'upstream/master'
Former-commit-id: ec7e5a5f328476863cc1d92354268ccf99bc33cf
This commit is contained in:
@@ -85,7 +85,8 @@ public final class ConnectionFactory {
|
|||||||
if (connectionString != null) {
|
if (connectionString != null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Connection conn = null;
|
||||||
|
try {
|
||||||
//load the driver if necessary
|
//load the driver if necessary
|
||||||
final String driverName = Settings.getString(Settings.KEYS.DB_DRIVER_NAME, "");
|
final String driverName = Settings.getString(Settings.KEYS.DB_DRIVER_NAME, "");
|
||||||
if (!driverName.isEmpty()) { //likely need to load the correct driver
|
if (!driverName.isEmpty()) { //likely need to load the correct driver
|
||||||
@@ -127,7 +128,6 @@ public final class ConnectionFactory {
|
|||||||
Logger.getLogger(CveDB.class.getName()).log(Level.FINE, "Connection String: {0}", connectionString);
|
Logger.getLogger(CveDB.class.getName()).log(Level.FINE, "Connection String: {0}", connectionString);
|
||||||
Logger.getLogger(CveDB.class.getName()).log(Level.FINE, "Database User: {0}", userName);
|
Logger.getLogger(CveDB.class.getName()).log(Level.FINE, "Database User: {0}", userName);
|
||||||
|
|
||||||
Connection conn = null;
|
|
||||||
try {
|
try {
|
||||||
conn = DriverManager.getConnection(connectionString, userName, password);
|
conn = DriverManager.getConnection(connectionString, userName, password);
|
||||||
} catch (SQLException ex) {
|
} catch (SQLException ex) {
|
||||||
@@ -146,6 +146,7 @@ public final class ConnectionFactory {
|
|||||||
Logger.getLogger(ConnectionFactory.class.getName()).log(Level.FINE, "Unable to connect to the database", ex);
|
Logger.getLogger(ConnectionFactory.class.getName()).log(Level.FINE, "Unable to connect to the database", ex);
|
||||||
throw new DatabaseException("Unable to connect to the database");
|
throw new DatabaseException("Unable to connect to the database");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (shouldCreateSchema) {
|
if (shouldCreateSchema) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user