You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by jw...@apache.org on 2013/01/03 14:12:14 UTC

svn commit: r1428323 - /aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/Subsystems.java

Author: jwross
Date: Thu Jan  3 13:12:14 2013
New Revision: 1428323

URL: http://svn.apache.org/viewvc?rev=1428323&view=rev
Log:
[ARIES-990] NPE while establishing the root subsystem

When populating the root subsystem, the bundle revision adapted from a bundle is now checked for null in case the
bundle was uninstalled.

Modified:
    aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/Subsystems.java

Modified: aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/Subsystems.java
URL: http://svn.apache.org/viewvc/aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/Subsystems.java?rev=1428323&r1=1428322&r2=1428323&view=diff
==============================================================================
--- aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/Subsystems.java (original)
+++ aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/Subsystems.java Thu Jan  3 13:12:14 2013
@@ -168,6 +168,9 @@ public class Subsystems {
 		BundleContext context = Activator.getInstance().getBundleContext().getBundle(org.osgi.framework.Constants.SYSTEM_BUNDLE_LOCATION).getBundleContext();
 		for (Bundle bundle : context.getBundles()) {
 			BundleRevision revision = bundle.adapt(BundleRevision.class);
+			if (revision == null)
+				// The bundle has been uninstalled. Do not process.
+				continue;
 			if (!resourceReferences.getSubsystems(revision).isEmpty())
 				continue;
 			ResourceInstaller.newInstance(coordination, revision, root).install();