X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.osgi.boot%2Fsrc%2Forg%2Fargeo%2Fosgi%2Fboot%2FOsgiBoot.java;h=34457e669f1bf6387fc0cb5dbf8c4f4bf7404fe3;hb=aaa5cb182dcc0e209ddbbb3581787860329b86a5;hp=f44642d526fd8c8a2e429ffa1144aac042c52a1f;hpb=86e5f79860a8b3013b40a36c1f06c828d52f5249;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.osgi.boot/src/org/argeo/osgi/boot/OsgiBoot.java b/org.argeo.osgi.boot/src/org/argeo/osgi/boot/OsgiBoot.java index f44642d52..34457e669 100644 --- a/org.argeo.osgi.boot/src/org/argeo/osgi/boot/OsgiBoot.java +++ b/org.argeo.osgi.boot/src/org/argeo/osgi/boot/OsgiBoot.java @@ -181,11 +181,16 @@ public class OsgiBoot implements OsgiBootConstants { else if (OsgiBootUtils.debug) OsgiBootUtils.debug( "Installed " + bundle.getSymbolicName() + "-" + bundle.getVersion() + " from " + url); + assert bundle.getSymbolicName() != null; // uninstall previous versions bundles: for (Bundle b : bundleContext.getBundles()) { + if (b.getSymbolicName() == null) + continue bundles; if (bundle.getSymbolicName().equals(b.getSymbolicName())) { Version bundleV = bundle.getVersion(); Version bV = b.getVersion(); + if (bV == null) + continue bundles; if (bundleV.getMajor() == bV.getMajor() && bundleV.getMinor() == bV.getMinor()) { if (bundleV.getMicro() > bV.getMicro()) { // uninstall older bundles