for (Bundle bundle : getBundleContext().getBundles()) {
OsgiBundle osgiBundle = new OsgiBundle(bundle);
for (Bundle bundle : getBundleContext().getBundles()) {
OsgiBundle osgiBundle = new OsgiBundle(bundle);
- String location = bundle.getLocation();
- if (location.startsWith("reference:file:"))
- location = location.substring("reference:".length());
+ String originalLocation = bundle.getLocation();
+ String location = originalLocation;
+ if (originalLocation.startsWith("reference:file:"))
+ location = originalLocation.substring("reference:".length());
+
try {
URL url = new URL(location);
Resource res = resourceLoader.getResource(url.toString());
distributions.put(osgiBundle,
new VersionedResourceDistribution(osgiBundle, res));
try {
URL url = new URL(location);
Resource res = resourceLoader.getResource(url.toString());
distributions.put(osgiBundle,
new VersionedResourceDistribution(osgiBundle, res));