use of org.apache.felix.connect.Revision in project jackrabbit-oak by apache.
the class SpringBootSupport method processDescriptors.
public static List<BundleDescriptor> processDescriptors(List<BundleDescriptor> descriptors) throws IOException {
List<BundleDescriptor> processed = Lists.newArrayList();
for (BundleDescriptor desc : descriptors) {
if (desc.getRevision() == null) {
URL u = new URL(desc.getUrl());
URLConnection uc = u.openConnection();
if (uc instanceof JarURLConnection && uc.getClass().getName().startsWith(SPRING_BOOT_PACKAGE)) {
Revision rev = new SpringBootJarRevision(((JarURLConnection) uc).getJarFile(), uc.getLastModified());
desc = new BundleDescriptor(desc.getClassLoader(), desc.getUrl(), desc.getHeaders(), rev, desc.getServices());
}
}
processed.add(desc);
}
return processed;
}
Aggregations