Return-Path: Delivered-To: apmail-felix-dev-archive@www.apache.org Received: (qmail 77409 invoked from network); 11 Feb 2009 15:07:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Feb 2009 15:07:24 -0000 Received: (qmail 27477 invoked by uid 500); 11 Feb 2009 15:07:22 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 27431 invoked by uid 500); 11 Feb 2009 15:07:22 -0000 Mailing-List: contact dev-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 dev@felix.apache.org Received: (qmail 27386 invoked by uid 99); 11 Feb 2009 15:07:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Feb 2009 07:07:22 -0800 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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Feb 2009 15:07:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 95970234C48C for ; Wed, 11 Feb 2009 07:06:59 -0800 (PST) Message-ID: <702926563.1234364819611.JavaMail.jira@brutus> Date: Wed, 11 Feb 2009 07:06:59 -0800 (PST) From: "Richard S. Hall (JIRA)" To: dev@felix.apache.org Subject: [jira] Resolved: (FELIX-934) Bootdelegation bug In-Reply-To: <646462840.1234358702154.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FELIX-934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Richard S. Hall resolved FELIX-934. ----------------------------------- Resolution: Fixed Fix Version/s: (was: felix-1.4.1) felix-1.6.0 Yes, you are correct. The condition should have been: if ((m_bootPkgWildcards[i] && (pkgName.startsWith(m_bootPkgs[i]) || pkgName.regionMatches(0, m_bootPkgs[i], 0, m_bootPkgs[i].length() - 1))) || (!m_bootPkgWildcards[i] && m_bootPkgs[i].equals(pkgName))) This correctly checks for subpackages with "startsWith()" or an exact match of a wildcarded package with "regionMatches()". Please close this bug if you are satisfied and thanks for reporting it! > Bootdelegation bug > ------------------ > > Key: FELIX-934 > URL: https://issues.apache.org/jira/browse/FELIX-934 > Project: Felix > Issue Type: Bug > Components: Framework > Affects Versions: felix-1.4.1 > Environment: All > Reporter: Robert Koszegi > Assignee: Richard S. Hall > Fix For: felix-1.6.0 > > > Bootdelegation does not work as supposed in 1.4.1 > Let's say I provide the following parameter at startup org.osgi.framework.bootdelegation=org.acme.foo.bar.* > Then the class org.acme.foo.bar.ClassA should be loaded by the boot classloader meanwhile org.acme.foo.ClassB should not, however currently both classes will be loaded by the boot classloader. > This is due to a bug in R4SearchPolicyCore with checking if the bootdelegation should be applied for a given package: > if ((m_bootPkgWildcards[i] && > (pkgName.startsWith(m_bootPkgs[i]) || > m_bootPkgs[i].regionMatches(0, pkgName, 0, pkgName.length()))) > || (!m_bootPkgWildcards[i] && m_bootPkgs[i].equals(pkgName))) > That is m_bootPkgs[i].regionMatches(0, pkgName, 0, pkgName.length()) will pass for org.acme.foo if the bootdelegation is set for org.acme.foo.bar.* - but it should not! > Regards, > Robert -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.