AbstractBundle host = null;
	protected void updateWorker(PrivilegedExceptionAction action) throws BundleException {		boolean bundleActive = false;		AbstractBundle host = null;		if (!isFragment())			bundleActive = (state == ACTIVE);		if (bundleActive) {			try {				stopWorker(false);			} catch (BundleException e) {				framework.publishFrameworkEvent(FrameworkEvent.ERROR, this, e);				if (state == ACTIVE) /* if the bundle is still active */{					throw e;				}			}		}		try {			AccessController.doPrivileged(action);			framework.publishBundleEvent(BundleEvent.UPDATED, this);		} catch (PrivilegedActionException pae) {			throw (BundleException) pae.getException();		} finally {			if (bundleActive) {				try {					startWorker(false);				} catch (BundleException e) {					framework.publishFrameworkEvent(FrameworkEvent.ERROR, this, e);				}			}		}	}