dependency-check-core/src/main/java/org/owasp/dependencycheck/data/nvdcve/CveDB.java
/**
     * Closes the database connection. Close should be called on this object
     * when it is done being used.
     */
Closes the database connection. Close should be called on this object
when it is done being used.
Closes the database connection . Close should be called on this object when it is done being used .
@Override
    public synchronized void close() {
        if (instance != null) {
            instance.usageCount -= 1;
            if (instance.usageCount <= 0 && instance.isOpen()) {
                instance.usageCount = 0;
                clearCache();
                instance.closeStatements();
                try {
                    instance.connection.close();
                } catch (SQLException ex) {
                    LOGGER.error("There was an error attempting to close the CveDB, see the log for more details.");
                    LOGGER.debug("", ex);
                } catch (Throwable ex) {
                    LOGGER.error("There was an exception attempting to close the CveDB, see the log for more details.");
                    LOGGER.debug("", ex);
                }
                releaseResources();
            }
        }
    }
@ Override public synchronized void close ( ) { if ( instance != null ) { instance . usageCount -= 1 ; if ( instance . usageCount <= 0 && instance . isOpen ( ) ) { instance . usageCount = 0 ; clearCache ( ) ; instance . closeStatements ( ) ; try { instance . connection . close ( ) ; } catch ( SQLException ex ) { LOGGER . error ( "There was an error attempting to close the CveDB, see the log for more details." ) ; LOGGER . debug ( "" , ex ) ; } catch ( Throwable ex ) { LOGGER . error ( "There was an exception attempting to close the CveDB, see the log for more details." ) ; LOGGER . debug ( "" , ex ) ; } releaseResources ( ) ; } } }
Closes the database connection.
Closes the database connection .