broker.getCollection(collection.getPath() + '/' + child); perms[j] = childColl.getPermissions();
broker.openCollection(collection.getPath() + '/' + child, Lock.READ_LOCK); if(childColl != null) { try { perms[j] = childColl.getPermissions(); } finally { childColl.release(); } }
	public Permission[] listCollectionPermissions() throws XMLDBException {	    org.exist.collections.Collection c = collection.getCollection();		if (!c.getPermissions()			.validate(user, Permission.READ))			return new Permission[0];		Permission perms[] =			new Permission[c.getChildCollectionCount()];		DBBroker broker = null;		try {			broker = pool.get(user);			String child;			org.exist.collections.Collection childColl;			int j = 0;			for (Iterator i = c.collectionIterator();				i.hasNext();				j++) {				child = (String) i.next();				childColl =					broker.getCollection(collection.getPath() + '/' + child);				perms[j] = childColl.getPermissions();			}			return perms;		} catch (EXistException e) {			throw new XMLDBException(				ErrorCodes.VENDOR_ERROR,				e.getMessage(),				e);		} finally {			pool.release(broker);		}	}