boolean isLazy = false; int current = 0; AbstractBundle[] currentStartLevel = new AbstractBundle[shutdown.length]; for (int i = 0; i < shutdown.length; i++) {
for (int i = shutdown.length - 1; i >= 0; i--) {
	protected void decFWSL(int decToSL, AbstractBundle[] shutdown) {		if (Debug.DEBUG && Debug.DEBUG_STARTLEVEL) {			Debug.println("SLL: decFWSL: saving activeSL of " + decToSL); //$NON-NLS-1$		}		saveActiveStartLevel(decToSL);		if (decToSL == 0) { // stopping the framework			// stop and unload all bundles			suspendAllBundles(framework.bundles);			unloadAllBundles(framework.bundles);			return;		}		// just decrementing the active startlevel - framework is not shutting down		boolean isLazy = false;		int current = 0;		AbstractBundle[] currentStartLevel = new AbstractBundle[shutdown.length];		for (int i = 0; i < shutdown.length; i++) {			int bsl = shutdown[i].getStartLevel();			if (bsl > decToSL + 1 || bsl <= decToSL) {				// don't need to mess with bundles with startlevel > the previous active - they should already have been stopped				// or bsl <= decToSL then should remain active				continue;			} else if (bsl <= decToSL) {				// don't need to keep going - we've stopped all we're going to stop				break;			} else if (shutdown[i].isActive()) {				currentStartLevel[current] = shutdown[i];				current++;				if ((shutdown[i].getBundleData().getStatus() & Constants.BUNDLE_LAZY_START) != 0)					isLazy = true;			}		}		// The current StartLevel spec mandates that bundles at the same		// start-level are shutdown in decending bundle ID order.		// We keep that behavior unless there is at least one lazy-start bundle		// at in the start-level; then we shutdown in decending dependency order.		if (isLazy)			currentStartLevel = sortByDependencies(currentStartLevel, current);		for (int i = current - 1; i >= 0; i--) {			// if bundle is active or starting, then stop the bundle			if (Debug.DEBUG && Debug.DEBUG_STARTLEVEL) {				Debug.println("SLL: stopping bundle " + currentStartLevel[i].getBundleId()); //$NON-NLS-1$			}			framework.suspendBundle(currentStartLevel[i], false);		}	}