if(c != null) c.release();
	public Permission[] listResourcePermissions() throws XMLDBException {	    org.exist.collections.Collection c = collection.getCollection();		if (!c	.getPermissions()			.validate(user, Permission.READ))			return new Permission[0];		DBBroker broker = null;		try {			broker = pool.get(user);			Permission perms[] =				new Permission[c.getDocumentCount()];			int j = 0;			DocumentImpl doc;			for (Iterator i = c.iterator(broker); i.hasNext(); j++) {				doc = (DocumentImpl) i.next();				perms[j] = doc.getPermissions();			}			return perms;		} catch (EXistException e) {		    throw new XMLDBException(					ErrorCodes.VENDOR_ERROR,					e.getMessage(),					e);        } finally {		    pool.release(broker);		}	}