Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,8 @@ public synchronized IUBundleContainer update(Set<String> toUpdate, IProgressMoni
* @param artifacts the underlying artifact repo against which the bundles are validated
* @return map of BundleInfo to IResolvedBundle
*/
private Map<BundleInfo, TargetBundle> generateResolvedBundles(IQueryable<IInstallableUnit> source, IQueryable<IInstallableUnit> metadata, IFileArtifactRepository artifacts) throws CoreException {
private Map<BundleInfo, TargetBundle> generateResolvedBundles(IQueryable<IInstallableUnit> source,
IQueryable<IInstallableUnit> metadata, IFileArtifactRepository artifacts) {
OSGiBundleQuery query = new OSGiBundleQuery();
IQueryResult<IInstallableUnit> queryResult = source.query(query, null);
Map<BundleInfo, TargetBundle> bundles = new LinkedHashMap<>();
Expand All @@ -492,7 +493,8 @@ private Map<BundleInfo, TargetBundle> generateResolvedBundles(IQueryable<IInstal
return bundles;
}

private void generateBundle(IInstallableUnit unit, IFileArtifactRepository repo, Map<BundleInfo, TargetBundle> bundles) throws CoreException {
private void generateBundle(IInstallableUnit unit, IFileArtifactRepository repo,
Map<BundleInfo, TargetBundle> bundles) {
Collection<IArtifactKey> artifacts = unit.getArtifacts();
for (IArtifactKey artifactKey : artifacts) {
File file = null;
Expand All @@ -511,8 +513,16 @@ private void generateBundle(IInstallableUnit unit, IFileArtifactRepository repo,
}
}
if (file != null) {
TargetBundle bundle = new TargetBundle(file);
bundles.put(bundle.getBundleInfo(), bundle);
try {
TargetBundle bundle = new TargetBundle(file);
bundles.put(bundle.getBundleInfo(), bundle);
} catch (CoreException e) {
BundleInfo info = new BundleInfo(file.toURI());
info.setSymbolicName(artifactKey.getId());
info.setVersion(artifactKey.getVersion().toString());
InvalidTargetBundle invalidTargetBundle = new InvalidTargetBundle(info, e.getStatus());
bundles.put(info, invalidTargetBundle);
}
}
}
}
Expand Down
Loading