flush();
if (removalPendings.size() > 0) { BundleDescription[] removed = getRemovalPendings(); reResolve = mergeBundles(reResolve, removed); } flush(reResolve);
	private synchronized StateDelta resolve(boolean incremental, BundleDescription[] reResolve) {		try {			resolving = true;			if (resolver == null)				throw new IllegalStateException("no resolver set"); //$NON-NLS-1$			fullyLoad();			long start = 0;			if (StateManager.DEBUG_PLATFORM_ADMIN_RESOLVER)				start = System.currentTimeMillis();			if (!incremental) {				resolved = false;				reResolve = getBundles();				flush();			}			if (resolved && reResolve == null)				return new StateDeltaImpl(this);			if (removalPendings.size() > 0) {				BundleDescription[] removed = (BundleDescription[]) removalPendings.toArray(new BundleDescription[removalPendings.size()]);				reResolve = mergeBundles(reResolve, removed);			}			resolver.resolve(reResolve, platformProperties);			resolved = true;			StateDelta savedChanges = changes == null ? new StateDeltaImpl(this) : changes;			changes = new StateDeltaImpl(this);			if (StateManager.DEBUG_PLATFORM_ADMIN_RESOLVER) {				long time = System.currentTimeMillis() - start;				Debug.println("Time spent resolving: " + time); //$NON-NLS-1$				cumulativeTime = cumulativeTime + time;				DebugOptions.getDefault().setOption("org.eclipse.core.runtime.adaptor/resolver/timing/value", Long.toString(cumulativeTime)); //$NON-NLS-1$			}			return savedChanges;		} finally {			resolving = false;		}	}