Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 10956 invoked from network); 15 Mar 2007 02:20:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Mar 2007 02:20:30 -0000 Received: (qmail 30366 invoked by uid 500); 15 Mar 2007 02:20:38 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 30346 invoked by uid 500); 15 Mar 2007 02:20:38 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 30337 invoked by uid 99); 15 Mar 2007 02:20:38 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 19:20:38 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 19:20:29 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6CBF471407A for ; Wed, 14 Mar 2007 19:20:09 -0700 (PDT) Message-ID: <16313701.1173925209442.JavaMail.jira@brutus> Date: Wed, 14 Mar 2007 19:20:09 -0700 (PDT) From: "Vasily Zakharov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-3398) [classlib][swing] UIDefaults.getUIClass() uses wrong classloader In-Reply-To: <33328269.1173924909496.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/HARMONY-3398?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vasily Zakharov updated HARMONY-3398: ------------------------------------- Description: For now getUIClass(String) uses ClassLoader.getSystemClassLoader() while it should pass null to getUIClass(String, ClassLoader) instead, as the spec states: Returns: the Class object returned by getUIClass(uiClassID, null) Also, getUIClass(String, ClassLoader), if passed null classloader, now passes that null to class.forName(), which makes third-party classes loaded by non-system classloader unavailable for this method. It looks like using Thread.currentThread().getContextClassLoader() instead is a proper solution. Reasons for using "false" in Class.forName() are also unclear. The test in the attached test patch passes on RI but fails on Harmony, and works fine after the attached fix patch is applied. This issue was discovered while investigating issue HARMONY-3385. was: For now getUIClass(String) uses ClassLoader.getSystemClassLoader() while it should pass null to getUIClass(String, ClassLoader) instead, as the spec states: Returns: the Class object returned by getUIClass(uiClassID, null) Also, getUIClass(String, ClassLoader), if passed null classloader, now passes that null to class.forName(), which makes third-party classes loaded by non-system classloader unavailable for this method. It looks like using Thread.currentThread().getContextClassLoader() instead is a proper solution. The test in the attached test patch passes on RI but fails on Harmony, and works fine after the attached fix patch is applied. This issue was discovered while investigating issue HARMONY-3385. > [classlib][swing] UIDefaults.getUIClass() uses wrong classloader > ---------------------------------------------------------------- > > Key: HARMONY-3398 > URL: https://issues.apache.org/jira/browse/HARMONY-3398 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Vasily Zakharov > Attachments: Harmony-3398-fix.patch > > > For now getUIClass(String) uses ClassLoader.getSystemClassLoader() while it should pass null to getUIClass(String, ClassLoader) instead, as the spec states: > Returns: the Class object returned by getUIClass(uiClassID, null) > Also, getUIClass(String, ClassLoader), if passed null classloader, now passes that null to class.forName(), which makes third-party classes loaded by non-system classloader unavailable for this method. It looks like using Thread.currentThread().getContextClassLoader() instead is a proper solution. Reasons for using "false" in Class.forName() are also unclear. > The test in the attached test patch passes on RI but fails on Harmony, and works fine after the attached fix patch is applied. > This issue was discovered while investigating issue HARMONY-3385. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.