Return-Path: Delivered-To: apmail-felix-commits-archive@www.apache.org Received: (qmail 9799 invoked from network); 4 Apr 2008 21:30:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Apr 2008 21:30:26 -0000 Received: (qmail 10115 invoked by uid 500); 4 Apr 2008 21:30:26 -0000 Delivered-To: apmail-felix-commits-archive@felix.apache.org Received: (qmail 10084 invoked by uid 500); 4 Apr 2008 21:30:26 -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 10075 invoked by uid 99); 4 Apr 2008 21:30:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Apr 2008 14:30:25 -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.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Apr 2008 21:29:52 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D7DD31A9832; Fri, 4 Apr 2008 14:30:04 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r644939 - /felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java Date: Fri, 04 Apr 2008 21:30:04 -0000 To: commits@felix.apache.org From: pauls@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080404213004.D7DD31A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: pauls Date: Fri Apr 4 14:30:02 2008 New Revision: 644939 URL: http://svn.apache.org/viewvc?rev=644939&view=rev Log: Make sure to catch NoClassDefFoundError when trying to query the framework classloader for whether a class is available or not. Previously, it was possible that this query was leaked to bundles because of the error propagate all the way to the bundle that instigated the classload. Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java?rev=644939&r1=644938&r2=644939&view=diff ============================================================================== --- felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java (original) +++ felix/trunk/framework/src/main/java/org/apache/felix/framework/searchpolicy/R4SearchPolicyCore.java Fri Apr 4 14:30:02 2008 @@ -599,7 +599,14 @@ } if (delegate) { - return this.getClass().getClassLoader().loadClass(name); + try + { + return this.getClass().getClassLoader().loadClass(name); + } + catch (NoClassDefFoundError ex) + { + // Ignore, will return null + } } break; } @@ -3187,6 +3194,10 @@ { getClass().getClassLoader().loadClass(name); classpath = true; + } + catch (NoClassDefFoundError err) + { + // Ignore } catch (Exception ex) {