felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r654611 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
Date Thu, 08 May 2008 20:27:13 GMT
Author: rickhall
Date: Thu May  8 13:26:07 2008
New Revision: 654611

URL: http://svn.apache.org/viewvc?rev=654611&view=rev
Log:
Applied patch (FELIX-542) to give an error message when installing fragment
bundles.

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

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java?rev=654611&r1=654610&r2=654611&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java Thu May  8 13:26:07
2008
@@ -2317,6 +2317,8 @@
                     archive.getRevisionCount() - 1).getManifestHeader())));
 
                 verifyExecutionEnvironment(bundle);
+                
+                checkFragment(bundle);
 
                 addSecurity(bundle);
 
@@ -2452,6 +2454,21 @@
     }
 
     /**
+     * Checks whether bundle is a fragment bundle, and if so, logs a warning as fragment
bundles
+     * are not yet supported by Felix.
+     * @param bundle The bundle to verify
+    **/
+    private void checkFragment(FelixBundle bundle)
+    {
+        String fragmentHost = (String) bundle.getInfo().getCurrentHeader().get(Constants.FRAGMENT_HOST);
+        if (fragmentHost != null)
+        {
+            m_logger.log(Logger.LOG_WARNING, "Bundle " + bundle.getBundleId()
+                + " is a fragment bundle. Fragment bundles are not yet supported!");
+        }
+    }
+
+    /**
      * Check the required bundle execution environment against the framework provided
      * exectution environment.
      * @param bundleEnvironment The required execution environment string



Mime
View raw message