throw new BundleException(Msg.formatter.getString("BUNDLE_STATE_CHANGE_EXCEPTION"));
throw new BundleException(Msg.formatter.getString("BUNDLE_STATE_CHANGE_EXCEPTION",getLocation(),stateChanging.getName()));
	protected void beginStateChange() throws BundleException {		synchronized (statechangeLock) {			boolean doubleFault = false;			while (true) {				if (stateChanging == null) {					stateChanging = Thread.currentThread();					return;				}				if (doubleFault || (stateChanging == Thread.currentThread())) {					//TODO The message must be improved to indicate the name of the thread and the bundle that was changing state					throw new BundleException(Msg.formatter.getString("BUNDLE_STATE_CHANGE_EXCEPTION"));	//$NON-NLS-1$				}				try {					if (Debug.DEBUG && Debug.DEBUG_GENERAL) {						Debug.println(" Waiting for state to change in bundle " + this); 	//$NON-NLS-1$					}					long start = 0;					if (Debug.DEBUG)						start = System.currentTimeMillis();					statechangeLock.wait(5000); /*					 * wait for other thread to					 * finish changing state					 */					if (Debug.DEBUG) {						long end = System.currentTimeMillis();						if (end - start > 0) {							System.out.println("Waiting... : " + getSymbolicName() + ' ' + (end - start));						}					}				} catch (InterruptedException e) {				}				doubleFault = true;			}		}	}