public class SubsystemManifestValidator {
public static void validate(BasicSubsystem subsystem, SubsystemManifest manifest) {
validatePreferredProviderHeader(manifest.getPreferredProviderHeader());
if (subsystem.isComposite()) {
SubsystemContentHeader header = manifest.getSubsystemContentHeader();
if (header == null)
return;
for (SubsystemContentHeader.Clause clause : header.getClauses()) {
if (!clause.getVersionRange().isExact())
throw new SubsystemException("Composite subsystem using version range for content: " + clause);
}
}
else if (subsystem.isFeature()) {