AbstractBundle newBundle = framework.createAndVerifyBundle(newBundleData);
final AbstractBundle newBundle = framework.createAndVerifyBundle(newBundleData);
	protected void updateWorkerPrivileged(URLConnection source) throws BundleException {		AbstractBundle oldBundle = AbstractBundle.createBundle(bundledata, framework);		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.			AbstractBundle newBundle = framework.createAndVerifyBundle(newBundleData);			String[] nativepaths = framework.selectNativeCode(newBundle);			if (nativepaths != null) {				bundledata.installNativeCode(nativepaths);			}			boolean exporting;			int st = getState();			synchronized (bundles) {				exporting = reload(newBundle);				manifestLocalization = null;			}			// indicate we have loaded from the new version of the bundle			reloaded = true; 			if (System.getSecurityManager() != null && (bundledata.getType() & (BundleData.TYPE_BOOTCLASSPATH_EXTENSION | BundleData.TYPE_FRAMEWORK_EXTENSION)) != 0) {				// must check for AllPermission before allow a bundle extension to be installed				try {					hasPermission(new AllPermission());				} catch (SecurityException se) {					throw new BundleException(Msg.formatter.getString("BUNDLE_EXTENSION_PERMISSION"), se); //$NON-NLS-1$				}			}			// send out unresolved events outside synch block (defect #80610)			if (st == RESOLVED)				framework.publishBundleEvent(BundleEvent.UNRESOLVED, this);			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;		}	}