lock.wait(timeLeft);
synchronized(lock) { lock.wait(timeLeft); }
	public Class findLocalClass(String name) throws ClassNotFoundException {		if (EclipseAdaptor.MONITOR_CLASSES)	//Suport for performance			ClassloaderStats.startLoadingClass(getClassloaderId(), name);		boolean found = true;				try {			Bundle bundle = (Bundle) hostdata.getBundle();			// If the bundle is active, just return the class			if (bundle.getState() == Bundle.ACTIVE)				return super.findLocalClass(name);						//If the bundle is uninstalled, classes can still be loaded from it			if (bundle.getState() == Bundle.UNINSTALLED)				 return super.findLocalClass(name);						//If the bundle is stopping, we don't want to reactive it but we still want to be able to load classes from it.			if (bundle.getState() == Bundle.STOPPING)				return super.findLocalClass(name);						// The bundle is not active and does not require activation, just return the class			if (! shouldActivateFor(name))				return super.findLocalClass(name);							// The bundle is starting			if (bundle.getState() == Bundle.STARTING) {				//If the thread trying to load the class is the one trying to activate the bundle, then return the class 				if (bundle.testStateChanging(Thread.currentThread()) || bundle.testStateChanging(null))					return super.findLocalClass(name);						//If it's another thread, we wait and try again. In any case the class is returned. The difference is that an exception can be logged.				if (! bundle.testStateChanging(Thread.currentThread())) {					Object lock = bundle.getStateChangeLock();					long start = System.currentTimeMillis();					long delay = 5000;					long timeLeft = delay;					while (true) {						if (bundle.testStateChanging(null))							break;												if (timeLeft <= 0)							break;						try {							lock.wait(timeLeft);						} catch(InterruptedException e) {							//Ignore and keep waiting						}						timeLeft = start + delay - System.currentTimeMillis();					}					if (timeLeft < 0 || bundle.getState() != Bundle.ACTIVE) {						String message = EclipseAdaptorMsg.formatter.getString("ECLIPSE_CLASSLOADER_CONCURRENT_STARTUP", new Object[] {Thread.currentThread(), name, bundle.getStateChanging().getName(), bundle.getSymbolicName() + '(' + bundle.getBundleId() + ')'}); //$NON-NLS-1$						EclipseAdaptor.getDefault().getFrameworkLog().log(new FrameworkLogEntry(EclipseAdaptorConstants.PI_ECLIPSE_OSGI, message, 0, null, null));					}					return super.findLocalClass(name);							}			}						//The bundle must be started.			try {				hostdata.getBundle().start();			} catch (BundleException e) {				String message = EclipseAdaptorMsg.formatter.getString("ECLIPSE_CLASSLOADER_ACTIVATION", bundle.getSymbolicName(),  Long.toString(bundle.getBundleId())); //$NON-NLS-1$				EclipseAdaptor.getDefault().getFrameworkLog().log(new FrameworkLogEntry(EclipseAdaptorConstants.PI_ECLIPSE_OSGI, message, 0, e, null));			} finally {				return super.findLocalClass(name);			}		} catch (ClassNotFoundException e) {			found = false;			throw e;		} finally {			if (EclipseAdaptor.MONITOR_CLASSES)				ClassloaderStats.endLoadingClass(getClassloaderId(), name, found);		}	}