dependency-check-core/src/main/java/org/owasp/dependencycheck/data/nvdcve/CveDB.java
/**
     * Opens the database connection. If the database does not exist, it will
     * create a new one.
     *
     * @throws DatabaseException thrown if there is an error opening the
     * database connection
     */
Opens the database connection. If the database does not exist, it will
create a new one.

@throws DatabaseException thrown if there is an error opening the
database connection
Opens the database connection . If the database does not exist it will create a new one . @throws DatabaseException thrown if there is an error opening the database connection
private synchronized void open() throws DatabaseException {
        try {
            if (!instance.isOpen()) {
                instance.connection = ConnectionFactory.getConnection();
                final String databaseProductName = determineDatabaseProductName(instance.connection);
                instance.statementBundle = databaseProductName != null
                        ? ResourceBundle.getBundle("data/dbStatements", new Locale(databaseProductName))
                        : ResourceBundle.getBundle("data/dbStatements");
                instance.prepareStatements();
                instance.databaseProperties = new DatabaseProperties(instance);
            }
        } catch (DatabaseException e) {
            releaseResources();
            throw e;
        }
    }
private synchronized void open ( ) throws DatabaseException { try { if ( ! instance . isOpen ( ) ) { instance . connection = ConnectionFactory . getConnection ( ) ; final String databaseProductName = determineDatabaseProductName ( instance . connection ) ; instance . statementBundle = databaseProductName != null ? ResourceBundle . getBundle ( "data/dbStatements" , new Locale ( databaseProductName ) ) : ResourceBundle . getBundle ( "data/dbStatements" ) ; instance . prepareStatements ( ) ; instance . databaseProperties = new DatabaseProperties ( instance ) ; } } catch ( DatabaseException e ) { releaseResources ( ) ; throw e ; } }
Opens the database connection.
Opens the database connection .