ResolverImport[] imports = rb.getImportPackages(); boolean needRewire = false; for(int j=0; j<imports.length; j++) { if(imports[j].getMatchingExport() != null && !resolverExports.contains(imports[j].getMatchingExport())) { imports[j].setMatchingExport(null); needRewire = true; } } if(needRewire) resolveBundle(rb);
	public synchronized void resolve(BundleDescription[] reRefresh, Dictionary platformProperties) {		if (DEBUG)			ResolverImpl.log("*** BEGIN RESOLUTION ***"); //$NON-NLS-1$		if (state == null)			throw new IllegalStateException("RESOLVER_NO_STATE"); //$NON-NLS-1$		if (!initialized) {			initialize();		}		// Unresolve all the supplied bundles and their dependents		if (reRefresh != null)			for (int i = 0; i < reRefresh.length; i++) {				ResolverBundle rb = (ResolverBundle) bundleMapping.get(reRefresh[i]);				if (rb != null)					unresolveBundle(rb, false);			}		// Initialize the resolving and resolved bundle lists		resolvingBundles = new ArrayList(unresolvedBundles.size());		resolvedBundles = new ArrayList(unresolvedBundles.size());		ResolverBundle[] bundles = (ResolverBundle[]) unresolvedBundles.toArray(new ResolverBundle[unresolvedBundles.size()]);		groupingChecker.addInitialGroupingConstraints(bundles);		// First check that all the meta-data is valid for each unresolved bundle		// This will reset the resolvable flag for each bundle		for (int i = 0; i < bundles.length; i++)			bundles[i].setResolvable(isResolvable(bundles[i].getBundle(), platformProperties));		// First attach all fragments to the matching hosts		for (int i = 0; i < bundles.length; i++)			attachFragment(bundles[i]);		// Attempt to resolve all unresolved bundles		for (int i = 0; i < bundles.length; i++) {			if (DEBUG)				ResolverImpl.log("** RESOLVING " + bundles[i] + " **"); //$NON-NLS-1$ //$NON-NLS-2$			resolveBundle(bundles[i]);			// Check for any bundles still in RESOLVING state - these can now be			// moved to RESOLVED as they are dependent on each other.  Any that			// could not be resolved would have been moved back to UNRESOLVED			while (resolvingBundles.size() > 0) {				ResolverBundle rb = (ResolverBundle) resolvingBundles.get(0);				if (rb.isFullyWired()) {					if (DEBUG || DEBUG_CYCLES)						ResolverImpl.log("Pushing " + rb + " to RESOLVED"); //$NON-NLS-1$ //$NON-NLS-2$					setBundleResolved(rb);				}			}		}		// Resolve all fragments that are still attached to at least one host.		if (unresolvedBundles.size() > 0) {			bundles = (ResolverBundle[]) unresolvedBundles.toArray(new ResolverBundle[unresolvedBundles.size()]);			for (int i = 0; i < bundles.length; i++)				resolveFragment(bundles[i]);		}		if (DEBUG_WIRING)			printWirings();		stateResolveBundles();		// throw away the temporary resolving and resolved bundle lists		resolvingBundles = null;		resolvedBundles = null;		if (DEBUG)			ResolverImpl.log("*** END RESOLUTION ***"); //$NON-NLS-1$	}