Return-Path: Delivered-To: apmail-felix-commits-archive@www.apache.org Received: (qmail 2907 invoked from network); 8 May 2008 20:27:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 May 2008 20:27:39 -0000 Received: (qmail 55463 invoked by uid 500); 8 May 2008 20:27:41 -0000 Delivered-To: apmail-felix-commits-archive@felix.apache.org Received: (qmail 55436 invoked by uid 500); 8 May 2008 20:27:41 -0000 Mailing-List: contact commits-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list commits@felix.apache.org Received: (qmail 55425 invoked by uid 99); 8 May 2008 20:27:41 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 May 2008 13:27:41 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 May 2008 20:26:55 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id C3B5023889C4; Thu, 8 May 2008 13:27:16 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r654611 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java Date: Thu, 08 May 2008 20:27:13 -0000 To: commits@felix.apache.org From: rickhall@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080508202716.C3B5023889C4@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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