You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 15, 2022. It is now read-only.
When I tried Concierge with own launcher I found out that BundleContext.getBundle(String) does not work correctly when the framework uses an existing storage.
Basically the scenario follows this pseudocode:
Frameworkframework = factory.newFramework(properties); // Here the path to the storage is setframework.init();
BundleContextsystemBundle = framework.getBundleContext();
Bundlebundle = systemBundle.getBundle(location);
if (bundle == null) {
try (InputStreamis = open(location)) {
bundle = systemBundle.installBundle(location, is);
}
}
The bundle variable is always null, while it should return the installed bundle when the code is run second time with the same storage. I tried replacing getBundle with something like:
And this always works. So the framework apparently knows which bundles were installed, it just does not update its structures for getBundle to work properly.
The described behavior of getBundle in this use case results in duplicated installation of the bundle – and what is even more interesting: the newly installed bundle has the same location as the existing bundle. I believe this is wrong as well and the location should be unique. Maybe the framework implementation fails to check the location duplicity for the same reason.