FBSavepoint fbSavepoint = (FBSavepoint)savepoint;
AbstractSavepoint fbSavepoint = (AbstractSavepoint)savepoint;
    public synchronized void releaseSavepoint(FirebirdSavepoint savepoint) throws SQLException {                if (getAutoCommit())            throw new SQLException("Connection.setSavepoint() method cannot " +                     "be used in auto-commit mode.");                if (!(savepoint instanceof FBSavepoint))            throw new SQLException(                    "Specified savepoint was not obtained from this connection.");                FBSavepoint fbSavepoint = (FBSavepoint)savepoint;                if (!fbSavepoint.isValid())            throw new SQLException("Savepoint is no longer valid.");        try {            getGDSHelper().executeImmediate(                    "RELEASE SAVEPOINT " + fbSavepoint.getServerSavepointId() + " ONLY");        } catch (GDSException ex) {            throw new FBSQLException(ex);        }                fbSavepoint.invalidate();                savepoints.remove(fbSavepoint);    }