From commits-return-58611-apmail-harmony-commits-archive=harmony.apache.org@harmony.apache.org Wed May 27 06:34:56 2009 Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 39526 invoked from network); 27 May 2009 06:34:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 May 2009 06:34:56 -0000 Received: (qmail 55930 invoked by uid 500); 27 May 2009 06:35:08 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 55886 invoked by uid 500); 27 May 2009 06:35: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 55877 invoked by uid 99); 27 May 2009 06:35:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 May 2009 06:35:08 +0000 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, 27 May 2009 06:35:06 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B2577234C04B for ; Tue, 26 May 2009 23:34:45 -0700 (PDT) Message-ID: <1921764204.1243406085729.JavaMail.jira@brutus> Date: Tue, 26 May 2009 23:34:45 -0700 (PDT) From: "Kevin Zhou (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-6213) [classlib][beans] XMLDecoder.readObject() should not invoke org.xml.sax.SAXParseException In-Reply-To: <1933394149.1243404885567.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-6213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kevin Zhou updated HARMONY-6213: -------------------------------- Attachment: HARMONY-6213.diff Would you please help to try it? > [classlib][beans] XMLDecoder.readObject() should not invoke org.xml.sax.SAXParseException > ----------------------------------------------------------------------------------------- > > Key: HARMONY-6213 > URL: https://issues.apache.org/jira/browse/HARMONY-6213 > Project: Harmony > Issue Type: Bug > Components: Classlib > Affects Versions: 5.0M9 > Reporter: Kevin Zhou > Fix For: 5.0M10 > > Attachments: HARMONY-6213.diff > > Original Estimate: 24h > Remaining Estimate: 24h > > Given a test case [1], RI passes it while HARMONY fails. > For HARMONY, it throws the following exceptions: > org.xml.sax.SAXParseException: Premature end of file. > Continue... > org.xml.sax.SAXParseException: Premature end of file. > Continue... > org.xml.sax.SAXParseException: Premature end of file. > Continue... > org.xml.sax.SAXParseException: Premature end of file. > Continue... > [1] Test Case: > public void test_readObject() throws Exception { > final Vector exceptionList = new Vector(); > final ExceptionListener exceptionListener = new ExceptionListener() { > public void exceptionThrown(Exception e) { > exceptionList.addElement(e); > System.err.println(e + "\nContinue..."); > } > }; > String content = "123"; > XMLDecoder xmlDecoder = new XMLDecoder(new ByteArrayInputStream(content > .getBytes("UTF-8"))); > xmlDecoder.setExceptionListener(exceptionListener); > assertEquals(new Integer(1), xmlDecoder.readObject()); > assertEquals(new Integer(2), xmlDecoder.readObject()); > assertEquals(new Integer(3), xmlDecoder.readObject()); > xmlDecoder.close(); > assertEquals(0, exceptionList.size()); > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.