try (InputStream is = item.getInputStream()) {
if (is != null) {
final RepositoryItemUid uid = item.getRepositoryItemUid();
final BundleInfo info = new BundleInfo(null, is, "file:" + uid.getPath(), item.getLength());
if (info.isOSGiBundle()) {
return info.build();
}
}
}
catch (final Exception e) {
log.warn("Unable to generate OBR metadata for item {}", item.getRepositoryItemUid(), e);