if (r.getSymbolicName() != null) {
try {
modelledResourceForThisMatch = new ModelledBundleResource (r, modellingManager, modellingHelper);
} catch (InvalidAttributeException iax) {
ResolverException re = new ResolverException("Internal error occurred: " + iax.toString());
log.debug(LOG_EXIT, "resolve", re);
throw re;
}
toReturn.add(modelledResourceForThisMatch);
}
}
}
log.debug(LOG_EXIT, "resolve", toReturn);
return toReturn;
} else {
Reason[] reasons = obrResolver.getUnsatisfiedRequirements();
// let's refine the list by removing the indirect unsatisfied bundles that are caused by unsatisfied packages or other bundles
Map<String,Set<String>> refinedReqs = refineUnsatisfiedRequirements(obrResolver, reasons);
StringBuffer reqList = new StringBuffer();
List<String> unsatisfiedRequirements = new LinkedList<String>();
for (Map.Entry<String, Set<String>> filterEntry : refinedReqs.entrySet()) {
log.debug("unable to satisfy the filter , filter = " + filterEntry.getKey() + "required by "+filterEntry.getValue());
String reason = extractConsumableMessageInfo(filterEntry.getKey(),filterEntry.getValue());
reqList.append('\n');
reqList.append(reason);
unsatisfiedRequirements.add(reason);
}
ResolverException re = new ResolverException(MessageUtil.getMessage("RESOLVER_UNABLE_TO_RESOLVE",
new Object[] { appName, reqList }));
re.setUnsatisfiedRequirements(unsatisfiedRequirements);
log.debug(LOG_EXIT, "resolve", re);
throw re;
}