Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 98416 invoked from network); 5 Jun 2008 09:22:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Jun 2008 09:22:05 -0000 Received: (qmail 97367 invoked by uid 500); 5 Jun 2008 09:22:08 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 97348 invoked by uid 500); 5 Jun 2008 09:22:08 -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 97339 invoked by uid 99); 5 Jun 2008 09:22:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jun 2008 02:22:08 -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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 05 Jun 2008 09:21:27 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 26A30234C134 for ; Thu, 5 Jun 2008 02:21:45 -0700 (PDT) Message-ID: <824267555.1212657705157.JavaMail.jira@brutus> Date: Thu, 5 Jun 2008 02:21:45 -0700 (PDT) From: "Kevin Zhou (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-5866) [classlib][beans] java.beans.XMLDecoder(4) always use Thread.currentThread().getContextClassLoader() In-Reply-To: <1200213226.1212656865144.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-5866?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kevin Zhou updated HARMONY-5866: -------------------------------- Attachment: (was: HARMONY-5866.diff) > [classlib][beans] java.beans.XMLDecoder(4) always use Thread.currentThread().getContextClassLoader() > ---------------------------------------------------------------------------------------------------- > > Key: HARMONY-5866 > URL: https://issues.apache.org/jira/browse/HARMONY-5866 > Project: Harmony > Issue Type: Bug > Components: Classlib > Affects Versions: 5.0M6 > Reporter: Kevin Zhou > Fix For: 5.0M6 > > Original Estimate: 24h > Remaining Estimate: 24h > > I read java.beans.XMLDecoder code and find that XMLDecoder(4) as follows: > public XMLDecoder(InputStream inputStream, Object owner, ExceptionListener listener, ClassLoader cl) { > this(inputStream, owner, listener); > defaultClassLoader = cl; > } > This constructor will first call XMLDecoder(3) which always use Thread.currentThread().getContextClassLoader() regardless of user's ClassLoader. > I think the solution is to set the deafultClassLoader first before use SAXParser to parse xml. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.