in atomos/src/main/java/org/apache/felix/atomos/impl/base/AtomosBase.java [913:946]
private AtomosContentIndexed createIndexedContent(String indexRoot,
String currentIndex,
String currentBSN, Version currentVersion, List<String> currentPaths)
{
ManifestHolder holder = new ManifestHolder();
String bundleIndexPath = indexRoot + currentIndex;
ConnectContentIndexed content = new ConnectContentIndexed(bundleIndexPath,
currentPaths, holder::getHeaders);
debug("Found indexed content: %s %s %s %s", currentIndex, currentBSN,
currentVersion, currentPaths);
String location = getIndexedLocation(content, currentBSN);
if (headerProvider != NO_OP_HEADER_PROVIDER)
{
Map<String, String> headers = applyHeaderProvider(holder, location,
getRawHeaders(content));
String symbolicName = headers.get(Constants.BUNDLE_SYMBOLICNAME);
if (symbolicName == null)
{
throw new IllegalStateException(
"Expecting a symbolic name for index bundle: " + currentBSN);
}
int semiColon = symbolicName.indexOf(';');
if (semiColon != -1)
{
symbolicName = symbolicName.substring(0, semiColon);
}
symbolicName = symbolicName.trim();
currentBSN = symbolicName;
currentVersion = Version.parseVersion(
headers.get(Constants.BUNDLE_VERSION));
}
return new AtomosContentIndexed(location, currentBSN, currentVersion,
content);
}