chapter_006/src/main/java/ru/job4j/parser/DataBase.java
/**
     * Close Connection, PreparedStatement, ResultSet if will not gonna close.
     *
     * @throws Exception - exception.
     */
Close Connection, PreparedStatement, ResultSet if will not gonna close.
@throws Exception - exception.
Close Connection PreparedStatement ResultSet if will not gonna close . @throws Exception - exception .
@Override
    public void close() throws Exception {
        this.conn.commit();
        this.conn.setAutoCommit(true);
        if (this.rs != null) {
            this.rs.close();
        }
        if (this.st != null) {
            this.st.close();
        }
        if (this.conn != null) {
            try {
                this.conn.close();
                LOGGER.info("--------CLOSE CONNECTION TO DATABASE--------");
            } catch (SQLException e) {
                LOGGER.error(e.getMessage(), e);
            }
        }
    }
@ Override public void close ( ) throws Exception { this . conn . commit ( ) ; this . conn . setAutoCommit ( true ) ; if ( this . rs != null ) { this . rs . close ( ) ; } if ( this . st != null ) { this . st . close ( ) ; } if ( this . conn != null ) { try { this . conn . close ( ) ; LOGGER . info ( "--------CLOSE CONNECTION TO DATABASE--------" ) ; } catch ( SQLException e ) { LOGGER . error ( e . getMessage ( ) , e ) ; } } }
Close Connection, PreparedStatement, ResultSet if will not gonna close.
Close Connection PreparedStatement ResultSet if will not gonna close .