Author: thomas.diesler(a)jboss.com
Date: 2010-02-25 02:45:13 -0500 (Thu, 25 Feb 2010)
New Revision: 101454
Modified:
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/ExportedPackageHelper.java
Log:
[JBOSGI-295] NullPointerException in ExportedPackageHelper constructor
Modified:
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/ExportedPackageHelper.java
===================================================================
---
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/ExportedPackageHelper.java 2010-02-25
07:31:44 UTC (rev 101453)
+++
projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/ExportedPackageHelper.java 2010-02-25
07:45:13 UTC (rev 101454)
@@ -49,6 +49,9 @@
public ExportedPackageHelper(BundleContext context)
{
+ if (context == null)
+ throw new IllegalArgumentException("Null context");
+
ServiceReference sref = context.getServiceReference(PackageAdmin.class.getName());
if (sref != null)
packageAdmin = (PackageAdmin)context.getService(sref);