Bundle oldBundle = Bundle.createBundle(this.bundledata, this.location, framework, this.startLevel);
Bundle oldBundle = Bundle.createBundle(bundledata, framework);
	protected void updateWorkerPrivileged(URLConnection source) throws BundleException {		Bundle oldBundle = Bundle.createBundle(this.bundledata, this.location, framework, this.startLevel);		boolean reloaded = false;		BundleOperation storage = framework.adaptor.updateBundle(this.bundledata, source);		BundleRepository bundles = framework.getBundles();		try {			BundleData newBundleData = storage.begin();			// Must call framework createBundle to check execution environment.			Bundle newBundle = framework.createBundle(newBundleData, this.location, this.startLevel);			// Check for a bundle already installed with the same symbolicName			// and version.			String symbolicName = newBundle.getSymbolicName();			Bundle installedBundle = symbolicName == null ? null : framework.getBundleByUniqueId(symbolicName, newBundle.getVersion().toString());			if (installedBundle != null && installedBundle != this) {				throw new BundleException(Msg.formatter.getString("BUNDLE_INSTALL_SAME_UNIQUEID", newBundle.getSymbolicName(), newBundle.getVersion().toString()));			}			String[] nativepaths = framework.selectNativeCode(newBundle);			if (nativepaths != null) {				bundledata.installNativeCode(nativepaths);			}			boolean exporting;			synchronized (bundles) {				bundles.markDependancies();				exporting = reload(newBundle);			}			reloaded = true; /*			 * indicate we have loaded from the new version of			 * the bundle			 */			storage.commit(exporting);		} catch (BundleException e) {			try {				storage.undo();				if (reloaded) /*				 * if we loaded from the new version of the				 * bundle				 */{					synchronized (bundles) {						reload(oldBundle); /* revert to old version */					}				}			} catch (BundleException ee) {				/* if we fail to revert then we are in big trouble */				framework.publishFrameworkEvent(FrameworkEvent.ERROR, this, ee);			}			throw e;		}	}