There was a bug when calculating a bundle's class path for fragments, it
should have been calculating the list locally first for each fragment then
adding it to the overall bundle class path.


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@688528 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/searchpolicy/ContentLoaderImpl.java b/framework/src/main/java/org/apache/felix/framework/searchpolicy/ContentLoaderImpl.java
index dc08875..27211a8 100644
--- a/framework/src/main/java/org/apache/felix/framework/searchpolicy/ContentLoaderImpl.java
+++ b/framework/src/main/java/org/apache/felix/framework/searchpolicy/ContentLoaderImpl.java
@@ -324,6 +324,9 @@
         // is on the bundle's class path and then creating content
         // objects for everything on the class path.
 
+        // Create a list to contain the content path for the specified content.
+        List localContentList = new ArrayList();
+
         // Get the bundle's manifest header.
         InputStream is = null;
         Map headers = null;
@@ -361,7 +364,7 @@
             // Check for the bundle itself on the class path.
             if (classPathStrings[i].equals(FelixConstants.CLASS_PATH_DOT))
             {
-                contentList.add(content);
+                localContentList.add(content);
             }
             else
             {
@@ -382,7 +385,7 @@
                 // class path content list.
                 if (embeddedContent != null)
                 {
-                    contentList.add(embeddedContent);
+                    localContentList.add(embeddedContent);
                 }
                 else
                 {
@@ -397,11 +400,13 @@
 
         // If there is nothing on the class path, then include
         // "." by default, as per the spec.
-        if (contentList.size() == 0)
+        if (localContentList.size() == 0)
         {
-            contentList.add(content);
+            localContentList.add(content);
         }
 
+        // Now add the local contents to the global content list and return it.
+        contentList.addAll(localContentList);
         return contentList;
     }
 }
\ No newline at end of file