} if (bundle.isResolved()) {
	protected void resolveBundles() {		long start = 0;		if (Debug.DEBUG && Debug.DEBUG_PACKAGEADMIN_TIMING)			start = System.currentTimeMillis();		/*		 * Resolve the bundles. This will make there exported packages available.		 */		if (Debug.DEBUG && Debug.DEBUG_PACKAGEADMIN) {			Debug.println("refreshBundles: resolve bundles");		}		BundleDescription[] resolved;		// get the state.		State state = framework.adaptor.getState();		// resolve the state and get the state delta		state.resolve(false);		Vector notify = new Vector();		synchronized (framework.bundles) {			List allBundles = framework.bundles.getBundles();			int size = allBundles.size();			for (int i = 0; i < size; i++) {				Bundle bundle = (Bundle) allBundles.get(i);				BundleDescription changedBundleDes = bundle.getBundleDescription();				boolean previouslyResolved = bundle.isResolved();				if (bundle != framework.systemBundle && changedBundleDes != null) {					if (changedBundleDes.isResolved() && !previouslyResolved) {						if (bundle.isFragment()) {							BundleHost host = (BundleHost) framework.getBundle(changedBundleDes.getHost().getSupplier().getBundleId());							if (((BundleFragment) bundle).setHost(host)) {								bundle.resolve();								notify.add(bundle);							}						} else {							bundle.resolve();							notify.add(bundle);						}					} else if (!changedBundleDes.isResolved() && previouslyResolved) {						// Need to log error.  This should not happen since the state should not touch						// bundles that we did not pass in to the resolve() call.						framework.publishFrameworkEvent(FrameworkEvent.ERROR, bundle, new BundleException(Msg.formatter.getString("STATE_UNRESOLVED_WRONG_BUNDLE", bundle.getLocation())));					}				} else {					if (bundle != framework.systemBundle) {						framework.publishFrameworkEvent(FrameworkEvent.ERROR, bundle, new BundleException(Msg.formatter.getString("BUNDLE_NOT_IN_STATE", bundle.getLocation())));					}				}			}			// update the exported package and bundle lists.			exportedPackages = getExportedPackages(exportedPackages);			exportedBundles = getExportedBundles(exportedBundles);		}		for (int i = 0; i < notify.size(); i++) {			Bundle bundle = (Bundle) notify.elementAt(i);			if (bundle != null) {				framework.publishBundleEvent(bundle.isResolved() ? BundleEvent.RESOLVED : BundleEvent.UNRESOLVED, bundle);			}		}		if (Debug.DEBUG && Debug.DEBUG_PACKAGEADMIN_TIMING) {			cumulativeTime = cumulativeTime + System.currentTimeMillis() - start;			DebugOptions.getDefault().setOption("debug.packageadmin/timing/value", Long.toString(cumulativeTime));		}	}