felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r1140307 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleImpl.java
Date Mon, 27 Jun 2011 20:44:01 GMT
Author: rickhall
Date: Mon Jun 27 20:44:00 2011
New Revision: 1140307

URL: http://svn.apache.org/viewvc?rev=1140307&view=rev
Log:
Need to check if a revision has a wiring or not. (FELIX-3013)

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleImpl.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleImpl.java?rev=1140307&r1=1140306&r2=1140307&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleImpl.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/BundleImpl.java Mon Jun
27 20:44:00 2011
@@ -506,10 +506,16 @@ class BundleImpl implements Bundle
         // Create a list of the revision and any attached fragment revisions.
         List<BundleRevision> result = new ArrayList<BundleRevision>();
         result.add(br);
-        List<BundleRevision> fragments = ((BundleWiringImpl) br.getWiring()).getFragments();
-        if (fragments != null)
+        BundleWiring wiring = br.getWiring();
+        if (wiring != null)
         {
-            result.addAll(fragments);
+// TODO: OSGi R4.3 - Technically, I think we can get the fragments using standard
+//       R4.3 API once we get everything implemented.
+            List<BundleRevision> fragments = ((BundleWiringImpl) wiring).getFragments();
+            if (fragments != null)
+            {
+                result.addAll(fragments);
+            }
         }
         return result;
     }



Mime
View raw message