private List<CircularRefInfo> orderProviders(CapabilityProviders providers) throws ProvisioningException { if(providers.isProvided()) { return Collections.emptyList(); } List<CircularRefInfo> firstLoop = null; if (!providers.specs.isEmpty()) { for (SpecFeatures specFeatures : providers.specs) { final List<CircularRefInfo> loop = orderFeaturesInSpec(specFeatures, !specFeatures.isFree()); if (providers.isProvided()) { return Collections.emptyList(); } if (firstLoop == null) { firstLoop = loop; } } } if (!providers.features.isEmpty()) { for (ResolvedFeature provider : providers.features) { final List<CircularRefInfo> loop = orderFeature(provider); if (providers.isProvided()) { return Collections.emptyList(); } if (firstLoop == null) { firstLoop = loop; } } } return firstLoop == null ? Collections.emptyList() : firstLoop; }
startNewBranch(null, branchIsBatch); allCircularRefs = orderFeature(features.get(i++));
throw new ProvisioningDescriptionException(Errors.unresolvedFeatureDep(feature, refId)); final List<CircularRefInfo> circularRefs = orderFeature(dep); if(dep.branch != null) { feature.addBranchDep(dep.branch, refId.isChildRef());
feature.free(); for(CircularRefInfo ref : initiatedCircularRefs) { if(orderFeature(ref.firstInConfig) != null) { throw new IllegalStateException(); if(orderFeature(ref.nextOnPath) != null) { throw new IllegalStateException();
orderFeature(feature); orderFeature(feature);