aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwr...@apache.org
Subject svn commit: r1428323 - /aries/trunk/subsystem/subsystem-core/src/main/java/org/apache/aries/subsystem/core/internal/Subsystems.java
Date Thu, 03 Jan 2013 13:12:14 GMT
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();



Mime
View raw message