Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 26663 invoked from network); 12 Jun 2008 10:28:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jun 2008 10:28:36 -0000 Received: (qmail 83571 invoked by uid 500); 12 Jun 2008 10:28:38 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 83543 invoked by uid 500); 12 Jun 2008 10:28: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 83475 invoked by uid 99); 12 Jun 2008 10:28:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jun 2008 03:28:38 -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, 12 Jun 2008 10:27:57 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 25D47234C139 for ; Thu, 12 Jun 2008 03:27:45 -0700 (PDT) Message-ID: <178742691.1213266465153.JavaMail.jira@brutus> Date: Thu, 12 Jun 2008 03:27:45 -0700 (PDT) From: "Sean Qiu (JIRA)" To: commits@harmony.apache.org Subject: [jira] Resolved: (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 ] Sean Qiu resolved HARMONY-5866. ------------------------------- Resolution: Fixed Applied at r667023. Please verify if it works as you expected.Thanks. > [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 > Assignee: Sean Qiu > Fix For: 5.0M6 > > Attachments: HARMONY-5866.diff, HARMONY-5866v2.diff > > 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.