// Sort and make sure the wabs dependencies order.
// Do not use Collections.sort(...)
WebComActivator[] wabActArray = wabActivators
.toArray(new WebComActivator[wabActivators.size()]);
final State state = BundleServiceUtil.getPlatformAdmin()
.getState(false);
for (int i = 0; i < wabActArray.length;) {
int lastMatched = i;
for (int j = i + 1; j < wabActArray.length; j++) {
boolean isBd1DependentBd2 = false;
BundleDescription bundleDes1 = state.getBundle(wabActArray[i]
.getBundle().getBundleId());
BundleSpecification[] requiredBundleDeses = bundleDes1
.getRequiredBundles();
for (BundleSpecification bundleSpec : requiredBundleDeses) {
BaseDescription supplier = bundleSpec.getSupplier();