}
	private AbstractBundle[] applyDeltas(BundleDelta[] bundleDeltas) throws BundleException {		ArrayList results = new ArrayList(bundleDeltas.length);		for (int i = 0; i < bundleDeltas.length; i++) {			int type = bundleDeltas[i].getType();			if ((type & (BundleDelta.REMOVAL_PENDING | BundleDelta.REMOVAL_COMPLETE)) != 0) {				applyRemovalPending(bundleDeltas[i]);			}			if ((type & BundleDelta.RESOLVED) != 0) {				AbstractBundle bundle = setResolved(bundleDeltas[i].getBundle());				if (bundle != null && bundle.isResolved())					results.add(bundle);			}		}		return (AbstractBundle[]) (results.size() == 0 ? null : results.toArray(new AbstractBundle[results.size()]));	}